mathematical script - count distinct numbers in arrays subject to certain conditions -- 5

Closed Posted 1 month ago Paid on delivery
Closed Paid on delivery

i need someone who is good at writing mathematical scripts

this job i need to develop a script to count distinct numbers in the outputted arrays

we can specify conditions like min or max etc

example

--------------

suppose i want to count all distinct numbers in the following sets of numbers

i will set a the MIN as 1 and MAX as 100 (but i can change this using boxes to enter min and max)

to generate the sets or arrays the program asks us for a starting number, increment and max number

note: max number is NOT mandatory

when i am counting the distinct numbers i can either

1. count all the distinct numbers between a MIN and a MAX that i specify or if i dont specify then we count between the starting number and the max number.

we can declare more than one set and in this case it will combine all the outputted numbers of all the sets then count the distinct numbers, so technially we are counting the DISTINCT numbers of the UNION of all the sets. If there is only 1 set then the UNION is just the set. (set 1)

note: i will enter the starting number, increment and ending number in the boxes for each set

set 1: starting number 3, increment 3, ending number 30

output of set 1: [3,6,9,12,15,18,21,24,27,30]

set 2: starting number 5, increment 5 ending number 30

output of set 2: {5,10,15,20,25,30}

then to get the COUNT we need to

COUNT DISTINCT UNION ALL SETS

in this

COUNT DISTINCT (SET 1 U SET 2)

SET 1 U SET 2 = {3,6,9,12,15,18,21,24,27,30} U {5,10,15,20,25,30}

= {3,5,6,9,10,12,15,18,20,21,24,25,27,30}

SO COUNT DISTINCT = 14

please note we can do this directly using UNION and removing any repeats or we can notice that

count distinct for set 1 = 10

count distinct for set 2 = 6

count for set 1 + set 2 = 16

intersection of set 1,2 = SET 1 intersect SET 2 = {15,30}

count SET 1 intersect SET 2 = 2

Therefore COUNT DISTINCT also equals COUNT (SET 1 + SET 2) - ( Count( SET 1 intersect SET 2))

= 10 + 6 - 2

=14

BUT THE UNION METHOD SEEMS FASTER IN MY VIEW

Essentially when we COUNT DISTINCT of all sets combined we are technically counting the elements in the UNION of all the sets...

Here is another special example

set 1: 1 2 3 4 5 6

set 2 : 1 2 3 4 5

set 3: 3 4 5 6

COUNT DISTINCT = 6

since the union is {1 2 3 4 5 6}

Note: the sets do NOT need to contain the same amount of elements

if howwever i specify the MIN as 3 and the MAX as 5 then COUNT DISTINCT will be 3 as 3,4,5 are distinct members of the UNION of set 1 set 2 and set 3 subject to the min and conditions

Note: dont confuse MIN and MAX with starting number and ending number

starting number , ending number are used to generate the elements of each set subject to the increment

MIN, MAX is used to COUNT between a MIN and MAX after the UNION has been determined

Note: i can add as many sets as i like so the program must allow for this

NO TIME WASTERS

Mathematics Algorithm

Project ID: #37927933

About the project

21 proposals Remote project Active last week

21 freelancers are bidding on average $29 for this job

mairajali11

As an Electrical/Electronics Engineer and Co-founder of 365softTec, I believe my proficiency in MATLAB, signal processing, and all kinds of Engineering Mathematics makes me the perfect fit for this project. Understandi More

$20 USD in 7 days
(76 Reviews)
5.8
mobimubasir

Hello. I read your requirement i will do that. Please come on chat we will discuss more about this. I will waiting your reply.

$20 USD in 1 day
(17 Reviews)
5.0
dohuutiepuct

Hi. Thanks for your posting. I have just read your proposal and I am sure I can complete the project on time. I am a mathematician who has 15 years of experiences in Numerical/Statistical Analysis(Matlab/Python/R, .... More

$50 USD in 7 days
(10 Reviews)
4.8
vikkykumar123

I have 5 years of Experience in Mathematics, C, C++ , Python, Java , Data structure, DBMS ,Algorithms, Computer Network, SQL, Operating System, HTML, CSS , JavaScript, React js , Node js, Angular Js , Mongo DB , Django More

$30 USD in 1 day
(20 Reviews)
4.6
assignsolver

I have read and understood all your project details "mathematical script - count distinct numbers in arrays subject to certain conditions -- 5" and I feel my self the best candidate to complete this project with 100 pe More

$10 USD in 1 day
(14 Reviews)
3.8
IdealExpert

Hi, I have seen your your project details and I am the "BEST CANDIDATE" for this job "mathematical script - count distinct numbers in arrays subject to certain conditions -- 5". I am Aisha Mujahid, an experienced pro More

$10 USD in 1 day
(10 Reviews)
3.7
HelpingHut

I am damn sure that I can complete this project "mathematical script - count distinct numbers in arrays subject to certain conditions -- 5" beyond your expectations and within your given time and budget. I am a speci More

$10 USD in 1 day
(4 Reviews)
3.2
SolutionMart

mathematical script - count distinct numbers in arrays subject to certain conditions -- 5 My name is "Usama Safdar" and I am a Ph.D degree holder which means I am highly-capable to tackle this project "Content Editor More

$10 USD in 1 day
(7 Reviews)
3.1
RehmanAshraf107f

Hello, I hope this message finds you well. I'm eager to assist you with your mathematical script project. My expertise lies in efficiently counting distinct numbers in arrays while adhering to specific conditions. Le More

$10 USD in 1 day
(11 Reviews)
3.3
ashrafsbai6655

Hi there, I checked your requirements and guarantee you that i have relevant experience in Python it's gonna be done within the next few hours . Let's contact via chat so that I can start work immediately

$100 USD in 1 day
(2 Reviews)
3.3
elhadfi

Hey there, I am a software engineer, familiar with writing mathematical scripts. I have seen your project and I'm sure that I can deliver the result in less than one hour. Feel free to contact me so we can work immedia More

$50 USD in 1 day
(4 Reviews)
3.2
TopWritingGuru

mathematical script - count distinct numbers in arrays subject to certain conditions -- 5 My name is Rabia Faisal, I am working in the writing industry since 2011. During this time, I have served countless clients wit More

$10 USD in 1 day
(3 Reviews)
2.9
abdellatiflatex

Hi, I am an applied mathematician, I have skills in algorithms, I excel at writing mathematical scripts, and can swiftly develop a script to count distinct numbers in outputted arrays, including specifications like min More

$10 USD in 1 day
(1 Review)
1.6
professorxwriter

Hi, I can do it in the next few hours by working on it right now. Message me for detailed discussion. Thanks and Looking forward:). For more information, visit my profiles and reviews for assessing my credibility. You More

$15 USD in 1 day
(0 Reviews)
1.0
jaid1992

With my expertise in algorithm design, I can effectively develop a script that perfectly matches the requirements of your project. I understand that you need a mathematical script that can count distinct numbers in arr More

$20 USD in 1 day
(0 Reviews)
0.0
smanik21598

I propose developing a Python script to fulfill your requirement of counting distinct numbers in arrays generated based on specified conditions. The script will offer a user-friendly interface for inputting sets of num More

$20 USD in 1 day
(0 Reviews)
0.0
Jorgemath9

Este trabajo es perfecto para mí ,para desarrollar un script que cumpla con las especificaciones de puede utilizar un lenguaje de programación ,este script define dos funciones una para generar conjuntos de números dad More

$25 USD in 7 days
(0 Reviews)
0.0
marc161

Dear sir. Nice to meet you. I am proficient in writing mathematical scripts and can develop a script to count distinct numbers in the outputted arrays, allowing you to specify conditions like minimum and maximum value More

$40 USD in 1 day
(0 Reviews)
0.0