Jump to content
BrainDen.com - Brain Teasers

superprismatic

Moderator
  • Posts

    1267
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by superprismatic

  1. Consider the following array of numbers:


    8 0 -4 -7 5 5 -11 11
    14 -11 3 9 -4 -13 14 1
    2 1 7 -6 14 -3 -3 3
    12 -10 -14 12 -11 10 -4 -4
    -13 -11 8 -12 1 14 3 -12
    -1 -3 2 2 4 -10 -8 -5
    -9 2 11 11 -10 5 -10 -12
    [/code] Your task is to pick elements out of this array so that the sum of the elements you pick is as large as possible. You may pick the same element multiple times as long as you don't violate any of the following rules. Also, in the following, "between" is always inclusive. OVERALL RULE: You must choose precisely 100 elements out of the array. ROW RULES: You must choose between 4 and 30 elements from the first row, between 7 and 39 from the second row, between 8 and 20 from the third, between 6 and 22 from the fourth, between 7 and 35 from the fifth, between 4 and 29 from the sixth, and between 2 and 47 from the seventh. COLUMN RULES: You must choose between 1 and 31 from the first column, between 3 and 42 from the second, between 7 and 36 from the third, between 7 and 40 from the fourth, between 5 and 30 from the fifth, between 1 and 34 from the sixth, between 1 and 9 from the seventh, and between 3 and 38 from the eight. INDIVIDUAL ELEMENT RULES: In the following array, the element [A,B] in the i[sup]th[/sup] row and j[sup]th[/sup] column specifies that you must choose the element located in the i[sup]th[/sup] row and j[sup]th[/sup] column of the original array between A and B times.
    [code]
    [0,11] [0, 9] [0, 4] [2, 9] [2, 4] [2,12] [1, 9] [1, 4]
    [1, 8] [0, 2] [0, 9] [1, 3] [1,13] [2, 9] [0, 8] [1, 7]
    [0,12] [1,13] [2,14] [1, 9] [0, 0] [2,14] [2, 8] [1, 1]
    [1, 8] [1, 7] [2, 3] [0,12] [1, 8] [0,14] [1, 2] [1,13]
    [0, 4] [1, 3] [2,12] [1, 3] [1, 8] [1,11] [0, 2] [2, 4]
    [1, 8] [0,11] [1, 2] [0, 5] [0, 6] [0, 1] [1,14] [1,10]
    [2, 3] [0,11] [0,12] [0,10] [1,13] [2, 6] [0, 3] [0, 7]

    So, for example, the -7 in the first

    row of the original array must be chosen at

    least twice but no more than 9 times.

    I have checked several times that it is possible to

    make choices which follow all the rules. I have a

    putative best answer. See how large your sum of

    100 elements can be while following all the rules.

    I'll let you know if you get close (or surpass) my

    best answer.

  2. The 26 letters of the alphabet are

    written in scrambled order in a

    circle. A message is then enciphered

    using the following scheme. Each

    letter of the message is represented

    by two letters whose (clockwise)

    distance apart in the circle is the

    position of the letter in the

    alphabet. Any two consecutive

    letters, say PJ, could represent

    A, JP representing Y; any doubled

    letter could represent Z, et cetera.

    A message enciphered in this way

    becomes


    QJ XE BN JA ZB RK RJ EZ NA
    CA JE XQ EZ XR BQ CX KZ NA
    OB JS AO QN BX CX KJ KS AX
    OC XV BV ZU FV FJ UM XL GL
    [/code]

    What does the message say? (Begins

    "A complete")

  3. oops i wrote 1 i actually meant 0. lol

    No matter what X you start with, iterating the ln function will eventually get to a negative value (right after it falls below 1) and you can't iterate any more because ln is undefined for negative values.

  4. I imagined 4 groups of 3 random number each between 1 and 12 with no repetition possible

    The possible distinct combnations for the first group would be: Combination of 3 in 12 elements = 12 x 11 x 10 / 3! = 220

    ( I say combinations since they have to be sorted from Small to big)

    The possible distinct combnations for the seond group would be: Combination of 3 in 9 elements = 9 x 8 x 7 / 3! = 84

    The possible distinct combnations for the third group would be: Combination of 3 in 6 elements = 6 x 5 x 4 / 3! = 20

    There is only one possibility for the last group when the preceding 3 are fixed = 1

    So possibble distinct combinations of these 4 groups = 220 x 84 x 20 x 1 = 369,600

    but when we add the SUM restriction, we notice that hidden within this number, were duplicate coding.

    I could visualize it simply as permutations for any above combination of groups: group 1 takes the place for group 2 for example.

    This would leave the sums the same and therefore same coding and decoding!

    So final number of DISTINCT CODING would be 369,600 / 4! = 15,400

    Am I missing something here? Maybe misunderstood the OP somehow....

    I am having some troubles reducing this to a macro on excel though: that is the only knowledge in programming that I acquired (by reading the help file for visual basic!!!!!).

    So don't keep your hopes up :)

    Well, you have correctly counted the number of 4 subsets of 3 each from 12. But the problem only requires 4 non-empty subsets. So, they could be of sizes 7, 2, 2, and 1, for example. You are reading too much into the problem. You will be exhausting over only 15,400 of the 611,501 possibilities!

  5. My approach was a bit more brute

    I figured that writing a code to go over a subset is too much work. I initialized 4 groups. Put 1 into group A, and left the other 3 empty. A recursive function then put the remaining number 2-12 into each of the four groups. That's (4^11) operations. I checked that at the end each of the four group is non-empty. I then use the groups to construct the plaintext. I used single letter frequencies to assign a likelihood to each plaintext, and made the program only print plaintexts with likelihood higher than a certain threshold. At the end, that produced a file of 10,000 plaintexts.

    I was going to do a more complex analysis with 2-letters frequencies, but I remembered an important lesson from the earlier Walter Penney puzzle about Confucious, so I just opened the plaintext file and searched for common english words such as "with", "there", "about", and so on. I found the correct plaintext when I searched for "said".

    I was surprised that computing all those subsets actually took less than a second, although it was tricky programming. Thanks for showing me a way that didn't occur to me.

  6. Lithgow is right.

    Nice! Do you mind giving a quick overview of how you did it?

    Even though I made it up, I wrote a program to solve it, going over all 611,501 possible ways to make the subsets, trying each and looking for a "reasonable" distribution of letters for the text. This is truely brute force but writing the code to go over the subsets was tricky -- I never looked for packaged code that was already out there.

  7. I see. I thought that the sequences of numbers are read off as the sequence of different squares that the fish is in (i.e. the instance the fish goes to another square, the square's letter is added to the sequence). This 'moment' thing is going to make things messy.

    Yeah, I thought of a guy humming a slowish tune and roughly seeing where the fish is on each beat. I actually originally made some bad assumptions which I had to abandon before I could solve it. I thought the fun of this problem was its intentional vagueness. This makes it a bit more fun because I am used to solving math problems where the hypotheses are very unambiguous. So, when I succeeded with this one, I felt an uncharacteristically weird sense of accomplishment. I hope you have as much fun with it as I did!

  8. My impression is that

    1) The bottom of the pool is divided into two rows of squares. The squares are touching one another at the sides or the verteces. So at any momment, the fish HAS to be in one of the squares.

    2) The fish is swimming aimlessly along the pool. Suppose that we define the current position of the fish by vertically projecting the fish's center of mass down to the bottom of the pool.

    3) If we imagine the track that the fish's center of mass makes as a line making a random walk, the probability that the line crosses the square's vertex over to a diagonal square as opposed to crossing a side is 0.

    Please correct any of these assumptions if they are not in accordance to the OP.

    All correct. Now the fish could get to a diagonal square other ways than by crossing over the vertex. I assume that the person writing down the sequence would adjust the moments slightly until the fish is pretty clearly within a square. The fish may even be in the same square at two successive moments, either by not leaving it or by leaving and returning to it before the next "moment" expires.

  9. Some clarification. Do we assume that the goldfish has zero size? Suppose the fish is in the top row in Square B, like this illustration


    A B C ...
    N O P ...
    [/code]

    He can cross over to A, go over to C, or down to O. However, if the goldfish has zero size, he possibly can cross over the diagonal and go to N or P. Although the chance of that is also effectively zero, even assuming that the fish has zero size. So, essentially, the question is "can the fish cross over to diagonally connected squares?"

    It swims "aimlessly" so I guess distance is somewhat limited but direction isn't. I don't see why he has to be zero size to get over to a diagonal square. It's a fish, so it can swim across a corner from "moment" to "moment". The bottom of the pool is marked off, but the fish isn't encumbered in any way by those markings.

  10. The bottom of a pool is marked off

    in two rows of squares. The letters

    A to M in order are written in one

    row and the letters N to Z in order

    in the other. A goldfish swims

    aimlessly in the pool and the

    letter it is over at any moment is

    noted. A sequence of letters formed

    in this way is used as key to

    encipher a message (by mod-26

    addition). The result is:


    FHTYI NYXKU QHDXS
    SHJIW BYOPN CLUR
    [/code]

    What was the message (contains the

    word "brave")?

    SUPERPRISMATIC NOTE: As usual with

    these puzzles, spaces in the cipher

    are only there for ease of reading.

    Note also that Penney did not say

    what the value of the letters are.

    So, the solver must make some

    assumption about that. It is part

    of the puzzle. Of course, knowing

    that it is solvable means that some

    wild scheme of assigning numbers to

    letters could not have been used.

    So, it may be safe to say that the

    numerical value of letters increases

    by 1 for each successive letter in

    the alphabet. But, is A=0? Or is

    A=1? Does it matter? That's part

    of the fun in solving this!

    Furthermore, successive "moments"

    must not be too far apart lest the

    key be so random as to make the

    problem unsolvable. You need to

    make some reasonable assumption as

    to how this restricts the key --

    more solving fun!

  11. quick clarification, are the numbers 1-12 necessarily divided in order?

    that is would 1,2,3,4,5; 6,7,8; 9; 10,11,12 be an acceptable one while 1,3,4; 2,5,7;... be invalid?

    They are not necessarily in order so that 1,3,4; 2,5,7;... would be valid.

  12. I've tried to construct a puzzle which

    would be in the Walter Penney style

    but which would be a bit of a challenge

    to the programmers out there. I hope

    many of you rise to the challenge!

    The numbers from 1 to 12 are divided

    into 4 non-empty subsets. Each subset

    has its members put in order from

    smallest to largest. Each has a

    pointer initially pointing to the

    smallest member of the subset. The

    sum of the numbers pointed to are

    used to encrypt a letter of a message.

    Then, each pointer is moved forward

    (circularly) pointing to the next

    number in its subset. Encryption

    continues in this way until the entire

    message is encrypted. Encryption is

    accomplished by advancing the letter

    of the message as many places along

    the standard alphabetical sequence

    (also circularly) as the sum of the

    pointed-to numbers specify. Thus, if

    the sum of the pointed-to numbers

    were 33 and the message letter were

    Q, then the cipher letter would be X.

    Read this message (spaces are not

    important -- they just make the

    message easier to read):


    VKGTI YRKCP OQGCH OSFFA UIDYK
    UYNOV HQGYR QDFML MSHTA IFLAM
    VQGAE QY
    [/code]

  13. I just exhausted over all 2,858,856 ways of numbering the dice and I get odds of 7:5 that Oppenheimer wins (probability of 7/12) with the dice:


    Die 1: 1,2,9,14,15,16
    Die 2: 6,7,8,11,12,13
    Die 3: 3,4,5,10,17,18

    1 beats 2 with probability 7/12;

    2 beats 3 with probability 7/12;

    3 beats 1 with probability 7/12.

  14. Consider the triangle with vertices at

    (0,0), (a,0), and (b,c) with 0 < b < a.

    Consider a point (x,y) inside this

    triangle. Shoot perpendiculars from

    (x,y) to each side of the triangle.

    This divides the triangle into 3

    quadrilaterals. Find (x,y) such that

    these quadrilaterals all have the same

    area.

    Sorry, I misstated the problem. In order to guarantee

    being able to shoot perpendiculars, the triangle

    needs to be acute. So, the problem should read:

    Consider an acute triangle with

    vertices at (0,0), (a,0), and (b,c)

    with 0 < b < a. Consider a point

    (x,y) inside this triangle. Shoot

    perpendiculars from (x,y) to each

    side of the triangle. This divides

    the triangle into 3 quadrilaterals.

    Find (x,y) such that these

    quadrilaterals all have the same area.

  15. Consider the triangle with vertices at

    (0,0), (a,0), and (b,c) with 0 < b < a.

    Consider a point (x,y) inside this

    triangle. Shoot perpendiculars from

    (x,y) to each side of the triangle.

    This divides the triangle into 3

    quadrilaterals. Find (x,y) such that

    these quadrilaterals all have the same

    area.

  16. In the first place we cant find gain, since we dont know what was the amount with which the trader started trading, we also dont know the initial number of shares he had , so we dont know the value of the shares he had initially (Only thing we know is that he had enough amount and shares to survive 5 days of trading)

    The question only asks the difference between the amount he started and the amount he ended.

    the answers for which are

    for a =110 : DIFFERENCE : Rs 1300

    for a =90 : DIFFERENCE : Rs 700

    Rs is just a unit for money used in INDIA ,so thats not important at all.

    The real thing that is puzzling me is that in all the 10 cases(mentioned in my prev post) the difference is coming out to be 1300 and i dont have a mathematical reason for this.

    So if some one can prove why this happening via some equation i will be grateful to him.

    It will also help me understand on which kind of equations similar phenomena of constant difference occurs.

    Thank You

    Anurag Kesarwani

    Consider the pair (P,A) where P is the stock price and A is the total monetary accumulation

    trader X has so far in his trading. This pair starts off to be (100,0) at the beginning

    of the first day. Let D be the function which takes (P,A) to its new value at the end of

    the day if the stock falls 10 points. We have that D[(P,A)]=(P-10,A+100-10P). Similarly,

    if we let U be the function which takes (P,A) to its new value at the end of the day if the

    stock rises 10 points. We have that U[(P,A)]=(P+10,A+100+10P). So,


    U[D[(P,A)]]=U[(P-10,A+100-10P)]=((P-10)+10,(A+100-10P)+100+10(P-10))=(P,A+100)
    [/code] and,
    [code]
    D[U[(P,A)]]=D[(P+10,A+100+10P)]=((P+10)-10,(A+100+10P)+100-10(p+10))=(P,A+100)
    which shows that

    U[D[(P,A)]]=D[U[(P,A)]]
    [/code]

    which tells us that D and U commute, as functions, with each other. So, in your example

    of 3 Ups and 2 Downs, the order doesn't matter. With a=110, you will always end with

    the same accumulation (Rs 1300). If you require more of an explanation, feel free to

    ask and I will try my best to explain further.

  17. Six words were written one below the

    other in a 6x6 square. The numbers

    0 through 5 were written in scrambled

    order down the side and the words

    shifted to the right (cyclically)

    these amounts. The same sequence of

    numbers was written across the top

    of the resulting square and the

    various columns shifted down

    (cyclically) these amounts. The

    result was:


    Y R O O N Y
    O L A O P O
    A S T N T C
    E S T U R M
    I E N E S G
    B S P E R R
    [/code]

    What were the words?

  18.  There is a fully scrambled key of 26 letters but our clue 'BALTIMORE' contains only 9 letters.

    Some instinct is needed, I think.

    All I revealed is:

    ----NG---AUT---A-O----E---

    And this inspires nothing to me.

    Sure I may have some fault in algoritm.

    What's needed now is a little intelligent guessing. For example, what letter is likely to be in front of NG? Work out all of the consequences of this guess then do some more intelligent guessing. So far, you're doin' good!

  19. Thanks for the clarification. So, my understanding is that

    1) The sequence of 26 alphabet letters are scrambled. We call this the key. A plaintext is chosen

    2) The 1st letter of the plaintext is encoded as the right-hand neighbor of the same letter in the key.

    3) The key is advanced 1 position.

    4) Repeat step 2 and 3 with the 2nd letter of the plain text, then the 3rd, and so forth.

    I just need one last clarification. If the key is a scramble of the alphabet, then the last letter of the this sequence does not have a right-hand neighbor. Does the wrap-around rule, i.e. right-hand neighbor of last letter is the first letter in sequence, apply here?

    Yes, wrap around applies.

  20. I'm not sure about the instructions. My impression is that

    1) There is a certain sentence of unknown length (Maybe this key is the same as the plaintext, but scrambled. I'm not sure about this). Spaces are not present. Call this the key.

    2) Each letter in the plain-text is replaced with the right-hand neighbor of the same letter in the key.

    3) After encryption once, the letters of the keys are advanced one position.

    I'm not too clear about step 3. Does it mean that step 1-3 are repeated several times on the same plain-text?

    (1) The "scrambled sequence" in the

    first sentence is a scramble of the

    alphabet.

    (2) the spaces in the string starting

    with KDZAS are there only to make

    transcription easier.

    (3) each letter of the "scrambled sequence" is advanced

    (4) the next letter of the plain is encrypted.

  21. Each letter of a message is replaced

    by its right-hand neighbor in a

    certain scrambled sequence. After

    each step all the letters in this

    scrambled sequence are advanced one

    position in the normal alphabetical

    sequence. (A follows Z.) With this

    scheme BALTIMORE becomes ZGQZYRBAM.

    What does KDZAS EBKOK GZYEV YJTWQ

    LBXJY WI represent, using the same

    initial set-up?

  22. It seems that either I am missing something or there is some information missing in the question

    Given the question as is and my understanding of it, there are many ways to make such 12 cuts on the cardboard.

    Consider the 6x8 rect as divided into 4 quadrants. Make any number of cuts on the top left quadrant and the ramaining on any other quadrant such that they are not mirror images of cuts on the first quadrant.

    After the 4 rotations, all characters will have been seen (only once). example a cut made on the top left character would after 4 rotations as suggested in the question would cover top right, bottom right and bottom left cells.

    Explanation:

    Consider the 6x8 rectangle as below and the cardboard will cuts for all 12 characters in the first quadrant:

    post-17784-12511031189587.jpg

    Now the 4 rotations are as below:

    post-17784-12511031394609.jpg

    So, you can see all 48 characters once in 4 rotations.

    Now, the same would apply even if you cut any other quadrant or for that matter, making cuts that are not mirror images of cuts made on the first quadrant. For example:

    post-17784-12511032154361.jpg

    Yes, there are many ways to make the cutouts. But, there is only one which will allow you to make a good English sentence. You are not asked to find the cutout pattern -- just find the sentence. Of course, once you get the sentence it is easy to reconstruct the pattern. There is enough information here to solve the problem.

×
×
  • Create New...