Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Highly Rated Users

Forum
No Posts Rated

Top 50
Given
Received

Forum Statistics

Users
Members:
1877
Members Online:
4
Guests Online:
120

Total Post History
Posts:
81447
Topics:
18714

7-Day Post History
New Posts:
0
New Topics:
0
Active Topics:
0

Our newest member
AlicjaHYBCIA

Other

FAQ
All times are UTC [ DST ]

Google Ads

Some puzzles in case you are bored

Mind Boggling Puzzles, to keep that grey matter in shape...
Forum rules
Always post answers in a "Hidecode" tag, so that others have a chance to answer the question too.
Please wait...

Some puzzles in case you are bored

Postby SQLDenis on Mon Sep 13, 2010 5:18 pm

1)Find the last non-zero digit of 30^2345

2)A man visits a shopping mall almost every day and he walks up an up-going escalator that connects the ground and the first floor. If he walks up the escalator step by step it takes him 16 steps to reach the first floor. One day he doubles his stride length (walks up climbing two steps at a time) and it takes him 12 steps to reach the first floor. If the escalator stood still, how many steps would there be on sight?

3)A rectangular ground is to be filled with square tiles of unit area. The border of the ground should be of red coloured tiles and inside white. If the number of red and white tiles are the same, find the minimum dimensions of the ground.

4)N people were in a party and were seated in a circular manner. If each of the two present in the party, except the pairs that were adjacent,sang a song and If a song lasted for 2 mins and 28 mins was taken for singing the songs, find N.

5)3 pirates have to decide how to divide their loot of 100 gold coins. The rules are as follow:
* The most senior pirate gets to propose a way to divide the loot.
* Each pirate, including the most senior pirate himself gets to vote.
* If the majority agrees with the proposal, the loot will be divided as suggested.
* In the case of a tie, the proposal will be accepted.
* If the majority disagrees, the most senior pirate will be killed. The next most senior pirate gets to suggest.

The process continues. Now, you're the most senior pirate out of the three. How are you going to divide the coins so that you get the biggest share possible?

6) Find the number of solutions for 3x+4y=60, if x and y are positive integers.

7)There are 25 Horses which all run at different speeds. A faster horse always beats a slower horse. You can race 5 horses at a time. There are no ties and you may not time them. What is the minimum number of races needed to determine the 3 fastest horses in order from fastest to slowest.
User avatar
SQLDenis
LTD Admin
LTD Admin
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
 
Posts: 21784
Joined: Wed Oct 10, 2007 6:43 pm
Location: Princeton, New Jersey, USA,World, Solar System, Milky Way, Universe and Beyond

Re: Some puzzles in case you are bored

Postby traingamer on Mon Sep 13, 2010 10:11 pm

The first one is easy:
Code is hidden, SHOW


The third one is a little trickier.

Code is hidden, SHOW


5)

Code is hidden, SHOW
Greg

People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
User avatar
traingamer
Senior Sage
Senior Sage
LTD Bronze - Rating: 233LTD Bronze - Rating: 233LTD Bronze - Rating: 233LTD Bronze - Rating: 233LTD Bronze - Rating: 233
 
Posts: 1490
Joined: Thu Feb 28, 2008 4:13 pm
Location: St. Louis, MO, US

Re: Some puzzles in case you are bored

Postby MHGlassman on Mon Sep 13, 2010 10:48 pm

Not fair posting this at the start of the business week! ;) I'm working on finding time for numbers 5 and 7. Meanwhile, here are my answers for the others:
Code is hidden, SHOW
"The trouble with quotes on the Internet is that it's 
difficult to determine whether or not they are genuine."
-- Abraham Lincoln
User avatar
MHGlassman
Senior Apprentice
Senior Apprentice
LTD Bronze - Rating: 115LTD Bronze - Rating: 115LTD Bronze - Rating: 115
 
Posts: 72
Joined: Tue Jun 17, 2008 7:58 pm
Location: Englewood, CO, USA
Unrated

Re: Some puzzles in case you are bored

Postby MHGlassman on Mon Sep 13, 2010 10:59 pm

I like Greg's answer to #5, so I won't pursue that further, and I realized that #7 was easier than I was first making it!

The answer to #7 is
Code is hidden, SHOW

Whew! :D Guess I can finally call it a day now!

Mike
"The trouble with quotes on the Internet is that it's 
difficult to determine whether or not they are genuine."
-- Abraham Lincoln
User avatar
MHGlassman
Senior Apprentice
Senior Apprentice
LTD Bronze - Rating: 115LTD Bronze - Rating: 115LTD Bronze - Rating: 115
 
Posts: 72
Joined: Tue Jun 17, 2008 7:58 pm
Location: Englewood, CO, USA
Unrated

Re: Some puzzles in case you are bored

Postby Naomi on Mon Sep 13, 2010 11:10 pm

I think answer #7 is wrong. There has to be a better algorithm.

BTW, when I was testing different powers of 3 in SQL Server, my results were wrong at some point - I got 0 and 4 - some strange numbers.

E.g. select power(3,20)

Say, select POWER(3.0,70) gives wrong result.

-------------------------
BTW, for some unknown reason, when I have multiple select statements in a batch I now get only the first result in the queries pane. Does it mean it's time to re-start SSMS?
Premature optimization is the root of all evil in programming.
Donald Knuth, repeating C. A. R. Hoare
Naomi
Senior Sage
Senior Sage
LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234
 
Posts: 1754
Joined: Thu Mar 26, 2009 5:46 am
Location: WI
Unrated

Re: Some puzzles in case you are bored

Postby MHGlassman on Mon Sep 13, 2010 11:22 pm

Naomi wrote:I think answer #7 is wrong. There has to be a better algorithm.


I thought about that, too, Naomi, but what seemed a "better" way gave the same answer:
Code is hidden, SHOW
"The trouble with quotes on the Internet is that it's 
difficult to determine whether or not they are genuine."
-- Abraham Lincoln
User avatar
MHGlassman
Senior Apprentice
Senior Apprentice
LTD Bronze - Rating: 115LTD Bronze - Rating: 115LTD Bronze - Rating: 115
 
Posts: 72
Joined: Tue Jun 17, 2008 7:58 pm
Location: Englewood, CO, USA
Unrated

Re: Some puzzles in case you are bored

Postby Naomi on Tue Sep 14, 2010 12:07 am

MHGlassman wrote:
Naomi wrote:I think answer #7 is wrong. There has to be a better algorithm.


I thought about that, too, Naomi, but what seemed a "better" way gave the same answer:
Code is hidden, SHOW


I think I solved it after thinking of your solution.

1. Run 5 races to get 3 winners in each race. - 5 races total

2. Now, take 5 fastest to get the 1st fastest, run a race between all 2nd place to get the fastest and run a race between 3rd place to get 1 fastest - 3 races

3. Last race - between 2nd and 3rd place from the fastest race and 1 and 2 winner from 2nd group and fastest horse from the 3rd group. This way we'll get 3 winners.

So, in total 9 races. The top best horse participated in only 2 races.
Premature optimization is the root of all evil in programming.
Donald Knuth, repeating C. A. R. Hoare
Naomi
Senior Sage
Senior Sage
LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234
 
Posts: 1754
Joined: Thu Mar 26, 2009 5:46 am
Location: WI

Re: Some puzzles in case you are bored

Postby MHGlassman on Tue Sep 14, 2010 12:22 am

Naomi wrote:So, in total 9 races.


Good job! You eliminated 10 horses in races 6-8 (one as certainly being the fastest in race 6, plus 2, 3, and 4 not-top-three horses from each race), saving two races and leaving just one race to determine the second and third fastest horses in race 9. Very clever. :salute:
"The trouble with quotes on the Internet is that it's 
difficult to determine whether or not they are genuine."
-- Abraham Lincoln
User avatar
MHGlassman
Senior Apprentice
Senior Apprentice
LTD Bronze - Rating: 115LTD Bronze - Rating: 115LTD Bronze - Rating: 115
 
Posts: 72
Joined: Tue Jun 17, 2008 7:58 pm
Location: Englewood, CO, USA
Unrated

Re: Some puzzles in case you are bored

Postby turuthok on Mon Oct 18, 2010 11:52 pm

For #7, since we only need to find three fastest, then 7 races is enough.

Code is hidden, SHOW
turuthok
Newbie
Newbie
LTD Bronze - Rating: 3
 
Posts: 1
Joined: Mon Oct 18, 2010 11:37 pm