• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Help with making a solution (using pseudo code)

Rehsa

New Member
Joined
Aug 28, 2018
Messages
1 (0.00/day)
Likes
0
#1
Please help me make a pseudo code solution for this problem.

A person suspects that a dice is biased and gets 10 people to throw 100 times each and record.

A algorithm is need input numbers from each person (into the a Throws array) and output the distribution of the numbers 1 to 6 as well as output the highest scoring.
Output whether or not the dice is biased.
 
Last edited:
Joined
Feb 14, 2019
Messages
1 (0.01/day)
Likes
1
#2
You'd need a distance metric for this. You'd never be sure if a dice is biased. You can throw 100 6s and it is still an unbiased dice even though probability of throwing 100 6s is 1/6^100.
So, you'd need some threshold and say a square distance metric.

Let's define M = [16.6, 16.6, 16.6, 16.6, 16.6, 16.6] array. This is 1/6 probability of each number a dice can be thrown in 100 throws.

If Throws array has the number of throws for each number, you can use a metric like

1/100 * Sum(1 = 0 to 5)(Throws - M)^2

And if this is greater than some threshold, the dice is "probably" biased.
 
Joined
Jun 24, 2013
Messages
14 (0.01/day)
Likes
1
#3
Joined
Feb 2, 2015
Messages
2,629 (1.71/day)
Likes
2,313
Location
On The Highway To Hell \m/
#4
He was obviously just trying to cheat on his homework assignment. Continue to stroke your own egos if you must I suppose. Just stop pretending like you're responding to the OP while you do it. Thanks!

A flowchart would solve the max 8 software bug. Yup.
Work on that..
You can bet other planes in Boeing's fleet have the same code origins.. Maybe even airbus.. who knows..
Yeeeeeaaaaahhh....right....:shadedshu:
 
Joined
Apr 21, 2010
Messages
5,426 (1.65/day)
Likes
2,580
Location
West Midlands. UK.
System Name Ryzen Reynolds
Processor Ryzen 1600 - 4.0Ghz 1.43v
Motherboard mATX Asrock AB350m AM4
Cooling Raijintek Leto Pro
Memory Vulcan T-Force 16GB DDR4 3000 16.18.18 @3200Mhz 14.17.17
Video Card(s) Sapphire Nitro+ 4GB RX 580 - 1450/2000 BIOS mod 8-)
Storage Seagate B'cuda 1TB/Sandisk 128GB SSD
Display(s) BenQ G2420HD
Case Corsair Carbide Series SPEC-01
Audio Device(s) Onboard
Power Supply Corsair VS 550w
Mouse Zalman ZM-M401R
Keyboard Razor Lycosa
Software Windows 10 x64
Benchmark Scores https://www.3dmark.com/spy/6220813
#5
yay another necro
 
Top