Just For Fun.......
-
I missed one question on the Math portion of my SATs many years ago and it was that same question (actually it was how long a fence could be built with x number of posts). It killed my perfect score. :(
espeir wrote:
how long a fence could be built with x number of posts
No of posts * diameter of 1 post? Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
espeir wrote:
how long a fence could be built with x number of posts
No of posts * diameter of 1 post? Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.
-
No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.
dan neely wrote:
No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.
Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence :-) Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
dan neely wrote:
No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.
Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence :-) Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
Nishant Sivakumar wrote:
Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence
You'd've gotten it wrong on the test then. :)
dan neely wrote:
You'd've gotten it wrong on the test then.
Nope, when I read the "spaced" part of the question, I'd know that fences are not made the same way in all parts of the world :-) Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
dan neely wrote:
No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.
Yep, that's when there is spacing. If you assume no spacing, and that the posts are fixed into the ground - it's n * diameter. That's how I mentally pictured a fence :-) Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)Nishant Sivakumar wrote:
That's how I mentally pictured a fence :)
A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?
---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums
-
Nishant Sivakumar wrote:
That's how I mentally pictured a fence :)
A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?
---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums
Shog9 wrote:
A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?
In Kerala (my state in India), most fences are made of concrete - in the towns. In the villages, people do have fences that are essentially a stack of trees - living fences :-) The trees are planted one after the other in a line to form the fence. There's no spacing between each tree. Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
Shog9 wrote:
A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?
In Kerala (my state in India), most fences are made of concrete - in the towns. In the villages, people do have fences that are essentially a stack of trees - living fences :-) The trees are planted one after the other in a line to form the fence. There's no spacing between each tree. Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)Nishant Sivakumar wrote:
The trees are planted one after the other in a line to form the fence. There's no spacing between each tree.
Neat. :)
---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums
-
Nishant Sivakumar wrote:
That's how I mentally pictured a fence :)
A fence made entirely of posts? Yeah, i could see that... but it'd get real pricey (unless you were building it in the middle of a heavily wooded area and could just cut your own posts as-needed). Have you seen many of these?
---- Scripts i’ve known... CPhog 1.0.0.0 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.2 - printer-friendly forums Expand all 1.0 - Expand all messages In-place Delete 1.0 - AJAX-style post delete Syntax 0.1 - Syntax highlighting for code blocks in the forums
-
No. The setup for that type of question is: "you have X posts, that need to be spaced D distance apart (for the cross peices). How long of a strait fence can you make?" The common wrong anser is X*d. The correct answer is (X-1)*D. If you're confused about why, set X = 2, and draw the fence |-|. This's why an off by one error is also called a fencepost error.
dan neely wrote:
off by one error
That's an OBOB* in my lexicon.:-D (Appologies to our mascot!) *OBOB: Off-By-One Bug. A common error in looping/counting algorithms. 'til next we type... HAVE FUN!! -- Jesse
-
dan neely wrote:
off by one error
That's an OBOB* in my lexicon.:-D (Appologies to our mascot!) *OBOB: Off-By-One Bug. A common error in looping/counting algorithms. 'til next we type... HAVE FUN!! -- Jesse
Obi-one
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighist -
Obi-one
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighist:laugh::laugh::laugh: 'til next we type... HAVE FUN!! -- Jesse
-
A carpenter was in a terrible hurry. He had to work as quickly as possible to cut a very heavy 10 foot plank into 10 equal sections. If it takes 1 minute per cut, how long will it take him to get the 10 equal pieces? "C++ will solve any problem."