Go to Post I think the GDC should force us to use steam engines, but the electrically-inclined folks on my team might stop whining if they're given more to work with. - Madison [more]
Home
Go Back   Chief Delphi > Other > Math and Science
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-07-2016, 21:43
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 456
Hitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to behold
Re: Math Quiz 9

Quote:
Originally Posted by FiMFanatic View Post
I am thinking the answer is a number that is very small (close to 0), as you can draw a ton more 0.000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 01 lines than you can 1 inch (or larger on a diagonal) lines.
Yet if you look at the Monte Carlo simulation, it looks closer to 0.521"
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award

Last edited by Hitchhiker 42 : 16-07-2016 at 22:01.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-07-2016, 22:00
z_beeblebrox's Avatar
z_beeblebrox z_beeblebrox is offline
Custom User Title
AKA: Cal
FRC #4183 (Bit Buckets)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cambridge MA
Posts: 811
z_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond repute
Re: Math Quiz 9

My simple Python Monte Carlo script gave me an average of 0.521408 (or 0.52141 rounded to 5 digits) in ~5e9 iterations (10 miles of hiking worth).

Code is below:
Code:
import numpy as np

iterations = 10000000

avg = 0

for i in range(100000):
    for i in range(iterations):
        pos = np.random.rand(4)
        length = np.sqrt((pos[0]-pos[1])**2+(pos[2]-pos[3])**2)
        avg = (avg*i + length)/(i+1)
    with open("test.txt", "a") as f:
        f.write(str(avg)+'\n')

Code:
import numpy as np

f = np.loadtxt('test.txt')
print(np.average(f))
print(len(f))
I split it into two scripts just so I could stop the computation whenever without altering the result.

Edit: Reps to whoever finds the bug in my code and explains what it does.
__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist

Last edited by z_beeblebrox : 16-07-2016 at 22:57. Reason: New challenge
Reply With Quote
  #3   Spotlight this post!  
Unread 16-07-2016, 22:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,986
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by z_beeblebrox View Post
0.52141 rounded to 5 digits
That is the correct answer. Reps to you


Reply With Quote
  #4   Spotlight this post!  
Unread 16-07-2016, 22:20
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,986
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by Ether View Post
That is the correct answer. Reps to you

Now, how would you get the correct answer accurate to, let's say, 8 decimal places?


Reply With Quote
  #5   Spotlight this post!  
Unread 16-07-2016, 22:32
FiMFanatic FiMFanatic is offline
Registered User
no team
 
Join Date: Apr 2016
Location: Michigan
Posts: 49
FiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud of
Re: Math Quiz 9

Makes no logical sense unless the question is improperly worded or bounded. You can fit an infinite number of lines in the box, and fact is, more lines closer to 0 in length fit in the box than lines averaging 0.52xxxx
Reply With Quote
  #6   Spotlight this post!  
Unread 16-07-2016, 22:35
z_beeblebrox's Avatar
z_beeblebrox z_beeblebrox is offline
Custom User Title
AKA: Cal
FRC #4183 (Bit Buckets)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cambridge MA
Posts: 811
z_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by FiMFanatic View Post
Makes no logical sense unless the question is improperly worded or bounded. You can fit an infinite number of lines in the box, and fact is, more lines closer to 0 in length fit in the box than lines averaging 0.52xxxx
I think the problem is more "Choose two random points inside by a 1" square and measure the distance between them. Repeat infinitely. What's the average of those measurements?"
__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist
Reply With Quote
  #7   Spotlight this post!  
Unread 16-07-2016, 22:40
FiMFanatic FiMFanatic is offline
Registered User
no team
 
Join Date: Apr 2016
Location: Michigan
Posts: 49
FiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud of
Re: Math Quiz 9

Quote:
Originally Posted by z_beeblebrox View Post
I think the problem is more "Choose two random points inside by a 1" square and measure the distance between them. Repeat infinitely. What's the average of those measurements?"
I agree then - your answer would make sense if that were the question. However, it was:

What's the average length of all the line segments which can be drawn inside a 1 inch square?
Reply With Quote
  #8   Spotlight this post!  
Unread 16-07-2016, 22:43
z_beeblebrox's Avatar
z_beeblebrox z_beeblebrox is offline
Custom User Title
AKA: Cal
FRC #4183 (Bit Buckets)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cambridge MA
Posts: 811
z_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by FiMFanatic View Post
I agree then - your answer would make sense if that were the question. However, it was:

What's the average length of all the line segments which can be drawn inside a 1 inch square?
If the problem is interpreted as you describe (What is the average length of all the line segments that could be packed into a 1" square at once without overlapping?), there would be no meaningful answer, since infinite line segments of any length l < sqrt(2)" could be fit within the square, as line segments have no thickness thus can be packed infinitely densely.
__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist

Last edited by z_beeblebrox : 16-07-2016 at 22:49. Reason: grammar
Reply With Quote
  #9   Spotlight this post!  
Unread 16-07-2016, 22:48
FiMFanatic FiMFanatic is offline
Registered User
no team
 
Join Date: Apr 2016
Location: Michigan
Posts: 49
FiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud of
Re: Math Quiz 9

Exactly - hence why people struggled to answer I think......
Reply With Quote
  #10   Spotlight this post!  
Unread 23-08-2016, 14:33
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,986
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by FiMFanatic View Post
...you can draw a ton more 0.000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 01 lines than you can 1 inch (or larger on a diagonal) lines.
Quote:
Originally Posted by FiMFanatic View Post
...fact is, more lines closer to 0 in length fit in the box than lines averaging 0.52xxxx

Quote:
Originally Posted by FiMFanatic View Post
Quote:
Originally Posted by z_beeblebrox View Post
I think the problem is more "Choose two random points inside by a 1" square and measure the distance between them. Repeat infinitely. What's the average of those measurements?"
I agree then - your answer would make sense if that were the question. However, it was:

What's the average length of all the line segments which can be drawn inside a 1 inch square?
@FimFanatic: Are you still reading this thread? I've done the best "devil's advocate" job I can arguing your point. Gus has answered every challenge. Has this discussion been helpful for you?


Reply With Quote
  #11   Spotlight this post!  
Unread 23-08-2016, 22:38
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,494
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by Ether View Post
I've done the best "devil's advocate" job I can arguing your point.
Whew! I've been torn among several ideas:
  1. Ether needs coffee.
  2. Ether has started trolling.
  3. Ether's CD account has been hijacked by a technically competent troll.
  4. Ether is up to a deep teaching moment.

I'm so glad to read that it was #4!
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #12   Spotlight this post!  
Unread 17-10-2016, 23:26
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,494
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Math Quiz 9

I'm not sure why CD wouldn't let me attach a file to a post on this thread, but I've posted my solutions to the cube at this "white paper": https://www.chiefdelphi.com/media/papers/3289.

For any who find this white paper a bit too much, let me simply note here that you don't want to see all of my blind alleys and solutions which worked but were much uglier than what I've shown here.

Edit: And OBTW, if anyone feels that my substitutions showed a bit too much prescience, that's ok, because I'm posting this on my birthday, and we should always expect prescience on our birthdays, no?
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 17-10-2016 at 23:36.
Reply With Quote
  #13   Spotlight this post!  
Unread 17-07-2016, 18:21
Caleb Sykes's Avatar
Caleb Sykes Caleb Sykes is offline
Registered User
FRC #4536 (MinuteBots)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: St. Paul, Minnesota
Posts: 1,026
Caleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by FiMFanatic View Post
Makes no logical sense unless the question is improperly worded or bounded. You can fit an infinite number of lines in the box, and fact is, more lines closer to 0 in length fit in the box than lines averaging 0.52xxxx
There are uncountably infinite lines of length 0.01, just as there are an uncountably infinite number of lines of length 0.52.

It makes no logical sense to say that there are "more" or "less" of one uncountably infinite thing than another uncountably infinite thing.
Reply With Quote
  #14   Spotlight this post!  
Unread 17-07-2016, 18:27
FiMFanatic FiMFanatic is offline
Registered User
no team
 
Join Date: Apr 2016
Location: Michigan
Posts: 49
FiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud ofFiMFanatic has much to be proud of
Re: Math Quiz 9

Quote:
Originally Posted by Caleb Sykes View Post
There are uncountably infinite lines of length 0.01, just as there are an uncountably infinite number of lines of length 0.52.

It makes no logical sense to say that there are "more" or "less" of one uncountably infinite thing than another uncountably infinite thing.
Excellent point. Hence the question was not worded well enough to allow for a proper solution.
Reply With Quote
  #15   Spotlight this post!  
Unread 17-07-2016, 18:30
Caleb Sykes's Avatar
Caleb Sykes Caleb Sykes is offline
Registered User
FRC #4536 (MinuteBots)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: St. Paul, Minnesota
Posts: 1,026
Caleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by FiMFanatic View Post
Excellent point. Hence the question was not worded well enough to allow for a proper solution.
The question is worded just fine. It asks for an average length of all lines, not the length of the line of most frequent length.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi