All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
View from Perplexus Tower (Posted on 2006-04-27) Difficulty: 3 of 5
Levik has invested a lot in real estate, and now owns all the land on one side of Flooble Blvd, ending with his very own Perplexus Tower. He now has 10 clients who each want to lease some land in order to build.

Each client plans to build something with a different number of stories from 1 to 10. Levik wants to be able to see all these buildings from the top of Perplexus Tower. This is impossible if any building is immediately behind another that is two or more stories higher.

In how many different orders can Levik lease the narrow strip of land to his 10 clients? What if, after building Perplexus Tower even higher, buildings can only be obscured if the one directly in front of it is three or more stories higher? Four? More?

See The Solution Submitted by Tristan    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: interesting variant | Comment 6 of 9 |

Somehow the Reply function is not working properly so I made this an independent comment.

The answer is 89 for a difference of two stories making viewing impossible.  In the following 89 valid sequences, the tower is on the left, and, to make the building heights single-digit, each is one lower than the number of stories on the building:

0123456789
0123456798
0123456879
0123457689
0123457698
0123465789
0123465798
0123465879
0123546789
0123546798
0123546879
0123547689
0123547698
0124356789
0124356798
0124356879
0124357689
0124357698
0124365789
0124365798
0124365879
0132456789
0132456798
0132456879
0132457689
0132457698
0132465789
0132465798
0132465879
0132546789
0132546798
0132546879
0132547689
0132547698
0213456789
0213456798
0213456879
0213457689
0213457698
0213465789
0213465798
0213465879
0213546789
0213546798
0213546879
0213547689
0213547698
0214356789
0214356798
0214356879
0214357689
0214357698
0214365789
0214365798
0214365879
1023456789
1023456798
1023456879
1023457689
1023457698
1023465789
1023465798
1023465879
1023546789
1023546798
1023546879
1023547689
1023547698
1024356789
1024356798
1024356879
1024357689
1024357698
1024365789
1024365798
1024365879
1032456789
1032456798
1032456879
1032457689
1032457698
1032465789
1032465798
1032465879
1032546789
1032546798
1032546879
1032547689
1032547698

DECLARE SUB permute (a$)
CLS
a$ = "0123456789": h$ = a$
OPEN "viewpplx.txt" FOR OUTPUT AS #2
DO
  good = 1
  FOR i = 1 TO 9
   FOR j = i + 1 TO 10
    IF VAL(MID$(a$, i, 1)) > VAL(MID$(a$, j, 1)) + 1 THEN good = 0: EXIT FOR
   NEXT
   IF good = 0 THEN EXIT FOR
  NEXT
  IF good THEN tot2 = tot2 + 1: PRINT #2, a$: PRINT tot2, a$
  permute a$
LOOP UNTIL a$ = h$
PRINT tot2


  Posted by Charlie on 2006-04-28 10:33:57
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information