OT - 7/5/2010 Puzzle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ganchrow
    SBR Hall of Famer
    • 08-28-05
    • 5011

    #1
    OT - 7/5/2010 Puzzle
    Rule 11010: I Hate Anagrams

    LOSHAK & ESCAZU = CHTBI

    JJGOLD & JERSEY = ?




    It's been over 2 years since I posted my last puzzle, and while I admit that this is far from one of my better ones, I gotta restart somewhere.

    First one to post the correct answer in this thread will win whatever points I have at that moment.

    If you have a question about this puzzle post it here. Any PMs on on this topic will be silently REdirected to /dev/null (not a clue, btw).
  • terpkeg
    SBR MVP
    • 10-26-09
    • 2364

    #2
    Syspu
    Comment
    • Data
      SBR MVP
      • 11-27-07
      • 2236

      #3
      Don't have an answer but was surprised to learn that while LOSHAK & ESCAZU is given as a scrambled BITCH it also makes ASSHOLE & ZCUKA.
      Comment
      • Ganchrow
        SBR Hall of Famer
        • 08-28-05
        • 5011

        #4
        Originally posted by Data
        Don't have an answer but was surprised to learn that while LOSHAK & ESCAZU is given as a scrambled BITCH it also makes ASSHOLE & ZCUKA.
        Yeah, like that's a surprise.

        His particular native tongue aside, one might say that Data's complaints regarding my last posted puzzle were taken to heart.
        Comment
        • Ganchrow
          SBR Hall of Famer
          • 08-28-05
          • 5011

          #5
          And speaking of Data's native tongue one might conceivable write:
          CHTBIЬЖВА
          Comment
          • djiddish98
            SBR Sharp
            • 11-13-09
            • 345

            #6
            Should we be converting words to binary?
            Comment
            • Data
              SBR MVP
              • 11-27-07
              • 2236

              #7
              Originally posted by Ganchrow
              ЬЖВА

              I just want to tell everyone that this looks like random four letters, nothing close to scrambled BITCH.
              Comment
              • Optional
                Administrator
                • 06-10-10
                • 61434

                #8
                Originally posted by Ganchrow
                CHTBIЬЖВА
                Beta beats 1000 BA holders?
                .
                Comment
                • Ganchrow
                  SBR Hall of Famer
                  • 08-28-05
                  • 5011

                  #9
                  Originally posted by djiddish98
                  Should we be converting words to binary?
                  You certainly could if you wanted, but remember that digital computers already do so natively.

                  This behavior, however, is not relevantly exposed in raw Excel 2003 (without use of VBA at least), but MS Windows' calc.exe could be a different story.

                  Still, you might want to continue with that line of thought.
                  Comment
                  • Ganchrow
                    SBR Hall of Famer
                    • 08-28-05
                    • 5011

                    #10
                    Originally posted by Data


                    I just want to tell everyone that this looks like random four letters, nothing close to scrambled BITCH.
                    Originally posted by Optional

                    Beta beats 1000 BA holders?
                    Note the title of the puzzle and recall my propensity for red herrings.
                    Comment
                    • Dark Horse
                      SBR Posting Legend
                      • 12-14-05
                      • 13764

                      #11
                      cgsbj

                      (in capitals)
                      Last edited by Dark Horse; 07-06-10, 05:59 AM.
                      Comment
                      • Ganchrow
                        SBR Hall of Famer
                        • 08-28-05
                        • 5011

                        #12
                        Originally posted by Dark Horse
                        cgsbj

                        (in capitals)
                        No sir, not the answer I had in mind ... but care to share your thought process?
                        Comment
                        • Dark Horse
                          SBR Posting Legend
                          • 12-14-05
                          • 13764

                          #13
                          if 011111+111111= 100000
                          and 100000 = 10001

                          then 001100+010110 = 111011
                          and 111011 = 11100
                          Comment
                          • Dark Horse
                            SBR Posting Legend
                            • 12-14-05
                            • 13764

                            #14
                            Using:
                            ACEG
                            BDFH etc

                            and 9.99900009999 to convert.
                            Comment
                            • Not Matt Rain
                              SBR Rookie
                              • 07-05-10
                              • 47

                              #15
                              Originally posted by Ganchrow
                              And speaking of Data's native tongue one might conceivable write:
                              CHTBIЬЖВА
                              Is CHTBI the only possible combination for LOSHAK & ESCAZU? Is it simply a constraint?
                              Last edited by Not Matt Rain; 07-06-10, 10:50 AM.
                              Comment
                              • Ganchrow
                                SBR Hall of Famer
                                • 08-28-05
                                • 5011

                                #16
                                Originally posted by Not Matt Rain
                                Is CHTBI the only possible combination for LOSHAK & ESCAZU? Is it simply a constraint?
                                Using the Roman alphabet, one could conceivably argue that one other such combination (differing only in the addition of a single letter) would be valid.

                                Personally, I'd beg to differ.
                                Comment
                                • Not Matt Rain
                                  SBR Rookie
                                  • 07-05-10
                                  • 47

                                  #17
                                  Wonderful.

                                  Originally posted by Dark Horse
                                  if 011111+111111= 100000
                                  and 100000 = 10001
                                  Whaaa? One of us is drunk.
                                  Comment
                                  • MonkeyF0cker
                                    SBR Posting Legend
                                    • 06-12-07
                                    • 12144

                                    #18
                                    I can't help but think that this is some sort of XOR cipher. The solution eludes me, however.
                                    Comment
                                    • pico
                                      BARRELED IN @ SBR!
                                      • 04-05-07
                                      • 27321

                                      #19
                                      wow ganch is still here.
                                      Comment
                                      • djiddish98
                                        SBR Sharp
                                        • 11-13-09
                                        • 345

                                        #20
                                        Here are my thoughts.

                                        The title lead me in the direction of converting each string to a binary. The use of & in the statement to me could be interpreted as applying the bitwise AND operator to both strings.

                                        In addition, there is some sort of bit shifting / masking perhaps (which would be the anagrams part), which is I believe what Monkey alluded to. So we're supposed to mix up the 1's and 0's to create a new binary sequence (anagram step 1), which when converted, creates a scrambled phrase which will be re-arranged to create the single word insult (anagram step 2).

                                        However, this extended beyond my experience after my first sentence.

                                        Good luck.
                                        Comment
                                        • Dark Horse
                                          SBR Posting Legend
                                          • 12-14-05
                                          • 13764

                                          #21
                                          Originally posted by Not Matt Rain
                                          Whaaa? One of us is drunk.
                                          I divided the alphabet into two rows, and assigned 1 for odd letters and 0 for even letters.
                                          1 for ACEGIK etc
                                          0 for BDFHJL etc

                                          Then the sum of the first two words is
                                          011111 + 111111, which I added up as 100000
                                          Comment
                                          • benjy
                                            SBR MVP
                                            • 02-19-09
                                            • 2158

                                            #22
                                            This is out in left field, but both Escazu and Jersey are locations. Since binary seems to be important here they could be converted into coordinates and some numerical value. Though one would have to decide which "Jersey" was referred to.
                                            Comment
                                            • djiddish98
                                              SBR Sharp
                                              • 11-13-09
                                              • 345

                                              #23
                                              I interpreted the locations to be almost like an analogy.

                                              I also noticed that the 4 person / location strings are 6 letters, while the answer for both is most likely 5. So I assume we'll have to drop some bits.
                                              Comment
                                              • Je_Tag
                                                SBR Rookie
                                                • 05-15-10
                                                • 1

                                                #24
                                                cough
                                                Comment
                                                • Not Matt Rain
                                                  SBR Rookie
                                                  • 07-05-10
                                                  • 47

                                                  #25
                                                  Originally posted by djiddish98
                                                  I also noticed that the 4 person / location strings are 6 letters, while the answer for both is most likely 5. So I assume we'll have to drop some bits.
                                                  That's what I can't make sense of.

                                                  The title of the puzzle makes it sound like there's no anagram/bit-shifting shit involved and that one should investigate another solution. "11010" is 26 so I assumed one was to simply convert each letter to its rank in the alphabet, then that rank into a binary string. This is supported by Hint #2 in which both character strings add up to 42 (that is, if Data's native language is Russian - there are at least 4 other variants of the Cyrillic alphabet with those same letters adding up to different totals). Then I made the connection between 42 and Ganchrow's HHGTTG-themed avatar and I gave up before losing my mind.

                                                  Ganchrow you win again.
                                                  Last edited by Not Matt Rain; 07-07-10, 09:35 AM.
                                                  Comment
                                                  • Not Matt Rain
                                                    SBR Rookie
                                                    • 07-05-10
                                                    • 47

                                                    #26
                                                    Maybe there's some math technicality I'm not seeing that involves the ampersand. Me math boob.
                                                    Comment
                                                    • Ganchrow
                                                      SBR Hall of Famer
                                                      • 08-28-05
                                                      • 5011

                                                      #27
                                                      Originally posted by Ganchrow
                                                      Using the Roman alphabet, one could conceivably argue that one other such combination (differing only in the addition of a single letter) would be valid.

                                                      Personally, I'd beg to differ.
                                                      The aforementioned combination would be ACHTBI.


                                                      Anagrams play absolutely no role in the problem and are offered solely as a red herring.
                                                      Comment
                                                      • Jrod124
                                                        SBR Hall of Famer
                                                        • 10-31-09
                                                        • 5622

                                                        #28
                                                        Not sure good question!!!!!
                                                        Comment
                                                        • Ganchrow
                                                          SBR Hall of Famer
                                                          • 08-28-05
                                                          • 5011

                                                          #29
                                                          Originally posted by Not Matt Rain
                                                          The title of the puzzle makes it sound like there's no anagram/bit-shifting shit involved and that one should investigate another solution. "11010" is 26 so I assumed one was to simply convert each letter to its rank in the alphabet,


                                                          As far as the answer to the ultimate question of life, the Universe, and everything ... that was mere coincidence.

                                                          Originally posted by Not Matt Rain
                                                          Ganchrow you win again.
                                                          I only "win" if I create an interesting puzzle that's readily solvable in a fair amount of time. It seems like I might have lost.
                                                          Comment
                                                          • Not Matt Rain
                                                            SBR Rookie
                                                            • 07-05-10
                                                            • 47

                                                            #30
                                                            Your last hint (ACHTBI) got me back on track Ganch. Please don't give the solution just yet, I may just hack my way through this.

                                                            I'm not obsessed. No.
                                                            Comment
                                                            • Megaman
                                                              SBR Rookie
                                                              • 12-11-09
                                                              • 23

                                                              #31
                                                              Jjgold & jersey = <Correct Answer>

                                                              Edit: Hmm. For some reason it does not like all capital letters.

                                                              Edit again. Ganch: This puzzle got me staying up an hour or so later than I had liked. It was fun though, so thank you.
                                                              Last edited by SBRforum Staff; 07-07-10, 06:12 PM.
                                                              Comment
                                                              • Ganchrow
                                                                SBR Hall of Famer
                                                                • 08-28-05
                                                                • 5011

                                                                #32
                                                                Originally posted by Megaman
                                                                Jjgold & jersey = <Correct Answer>

                                                                Edit: Hmm. For some reason it does not like all capital letters.

                                                                Edit again. Ganch: This puzzle got me staying up an hour or so later than I had liked. It was fun though, so thank you.
                                                                Very nicely done, Megaman, I'm glad you liked it.

                                                                Edited out your correct solution so as not to ruin it for anybody still working on the puzzle.

                                                                As promised, all my current SBR points are being shipped your way forthwith.

                                                                Good job.
                                                                Comment
                                                                • Not Matt Rain
                                                                  SBR Rookie
                                                                  • 07-05-10
                                                                  • 47

                                                                  #33
                                                                  Good job Megaman.

                                                                  Can we get an explanation now? I saw the correct answer when it was posted but I still can't make perfect sense of it.
                                                                  Comment
                                                                  • Data
                                                                    SBR MVP
                                                                    • 11-27-07
                                                                    • 2236

                                                                    #34
                                                                    Originally posted by Megaman
                                                                    Jjgold & jersey = <Correct Answer>
                                                                    Well done!

                                                                    Ganch: This puzzle got me staying up an hour or so later than I had liked.
                                                                    I have spent twice as much and could not get it... All that liqueur ain't doing nobody no good, I can tell ya this much!

                                                                    It was fun though, so thank you.
                                                                    There is more, enjoy:
                                                                    Comment
                                                                    • Ganchrow
                                                                      SBR Hall of Famer
                                                                      • 08-28-05
                                                                      • 5011

                                                                      #35
                                                                      Originally posted by Not Matt Rain
                                                                      Good job Megaman.

                                                                      Can we get an explanation now? I saw the correct answer when it was posted but I still can't make perfect sense of it.
                                                                      OK. You asked for it.

                                                                      The '&' symbol represents a bitwise AND which operates on two numbers by comparing corresponding bits when represented in binary notation.

                                                                      Each word represents a Base-26 number (A=0, B=1, C=2, ... , Z= 25).

                                                                      Hence, LOSHAK (L=11, O=14, S=18, H=7, A=0, K=10) corresponds to the base-10 number:
                                                                      10 × 260 + 0 × 261 + 7 × 262 + 18 × 263 + 14 × 264 + 11 × 265 = 137,413,910.

                                                                      Similarly ESCAZU (E=4, S=18, C=2, A=0, Z=25, U=20) corresponds to the base-10 number:
                                                                      20 × 260 + 25 × 261 + 0 × 262 + 2 × 263 + 18 × 264 + 4 × 265 = 55,786,894.

                                                                      Using a scientific calculator (such as calc.exe in Win32) we see that 137,413,910 AND 55,786,894 = 1,049,862. One may verify that the base-26 representation of this number (with 0=A, 1=B, 2=C, ... 25=Z) is given by CHBTI, or possibly ACHBTI (which maintains the leading A=0 byte).

                                                                      Performing the same transformations on both "JJGOLD" (J=9, J=9, G=6, O=14, L=11, D=3) and "JERSEY" (J=9, E=4, R=17, S=18, E=4, Y=24) yields base-10 values of 111,160,377 and 109,071,376, respectively. ANDing them together produces 109,054,992 or "JEQTYU" in base-26.

                                                                      Hence "JEQTY" is the solution to the puzzle.

                                                                      The following VBA code exposes the function PUZZLESOLVE(), which takes two string arguments, converts them to their base-26 numerical value and returns the string value of the two ANDed together:

                                                                      Code:
                                                                      Option Explicit
                                                                      
                                                                      Public Function PuzzleSolve(ByVal sInput1 As String, ByVal sInput2 As String) As String
                                                                          Dim vVal1 As Variant, vVal2 As Variant
                                                                          Dim vAndValue As Variant
                                                                          
                                                                          vVal1 = GetLongValFromString(sInput1)
                                                                          If vVal1 < 0 Then
                                                                              Exit Function
                                                                          End If
                                                                          
                                                                          vVal2 = GetLongValFromString(sInput2)
                                                                          If vVal2 < 0 Then
                                                                              Exit Function
                                                                          End If
                                                                          
                                                                          On Error GoTo OverflowCheck
                                                                          vAndValue = (vVal1 And vVal2)
                                                                          On Error GoTo 0
                                                                          PuzzleSolve = Dec2BaseN_Modified(vAndValue, 26)
                                                                      Exit Function
                                                                      OverflowCheck:
                                                                          If Err.Number = 6 Then
                                                                              'overflow
                                                                              On Error GoTo 0
                                                                              vAndValue = FloatingAnd(vVal1, vVal2)
                                                                              Resume Next
                                                                          Else
                                                                              On Error GoTo 0
                                                                              Resume
                                                                          End If
                                                                      End Function
                                                                      
                                                                      Private Function GetLongValFromString(ByVal sInput As String) As Variant
                                                                          Dim i As Long
                                                                          Dim lLength As Long, iVal As Integer, iRange As Integer
                                                                          Dim iLowAscValue As Integer, iHighAscValue As Integer
                                                                          Dim vTotalVal As Variant
                                                                          
                                                                          iLowAscValue = Asc("A")
                                                                          iHighAscValue = Asc("Z")
                                                                          iRange = iHighAscValue - iLowAscValue + 1
                                                                      
                                                                          sInput = UCase(sInput)
                                                                          lLength = Len(sInput)
                                                                          vTotalVal = 0
                                                                      
                                                                          For i = 1 To lLength
                                                                              iVal = Asc(Mid(sInput, i, 1)) - iLowAscValue
                                                                              If iVal < 0 Or iVal > iRange + 1 Then
                                                                                  MsgBox "Charcter# " & i & " of string '" & sInput & "' invalid."
                                                                                  GetLongValFromString = -1
                                                                                  Exit Function
                                                                              End If
                                                                              vTotalVal = vTotalVal + iVal * iRange ^ (lLength - i)
                                                                          Next i
                                                                          GetLongValFromString = vTotalVal
                                                                      End Function
                                                                      
                                                                      
                                                                      Public Function Dec2BaseN_Modified(ByVal vDecimal As Variant, lBase As Long, Optional ByVal bytMinPlaces As Byte = 0, Optional ByVal bStartNumerically As Boolean = False) As String
                                                                          ' Function to convert integer decimal values to integer base-N values (2<=N<=64)
                                                                          ' Output digits start with 26 ;atin capital letters, followed by
                                                                          ' 26 latin lowercase letters, followed by digits 0-9
                                                                          ' then the undesrcore, and lastly the forward slash ("/")
                                                                          ' note that for base 64 this is NOT the equivalent as base64 encoding
                                                                          ' with bStartNumerically set to TRUE, numbering begins with digits 0 - 9
                                                                          Dim bIsNegative As Boolean, lDecimal As Long
                                                                          Dim Size As Long, i As Long, lRemainder As Long
                                                                          Dim ExpandedDigitArray() As String
                                                                          
                                                                          If lBase < 2 Or lBase > 64 Then
                                                                              Exit Function
                                                                          End If
                                                                          
                                                                          ReDim ExpandedDigitArray(0 To lBase - 1)
                                                                          If bStartNumerically Then
                                                                              For i = 0 To lBase - 1
                                                                                  If i < 10 Then
                                                                                      ' numeric digits
                                                                                      ExpandedDigitArray(i) = CStr(i)
                                                                                  ElseIf i < 36 Then
                                                                                      ' Uppercase
                                                                                      ExpandedDigitArray(i) = Chr(i + 65 - 10)
                                                                                  ElseIf i < 62 Then
                                                                                      ' Lowercase
                                                                                      ExpandedDigitArray(i) = Chr(i - 97 - 36)
                                                                                  ElseIf i < 63 Then
                                                                                      ExpandedDigitArray(i) = "_"
                                                                                  Else
                                                                                      ExpandedDigitArray(i) = "/"
                                                                                  End If
                                                                              Next i
                                                                          Else
                                                                              For i = 0 To lBase - 1
                                                                                  If i < 26 Then
                                                                                      ' Uppercase
                                                                                      ExpandedDigitArray(i) = Chr(i + 65)
                                                                                  ElseIf i < 52 Then
                                                                                      ' Lowercase
                                                                                      ExpandedDigitArray(i) = Chr(i + 97 - 26)
                                                                                  ElseIf i < 62 Then
                                                                                      ' numeric digits
                                                                                      ExpandedDigitArray(i) = CStr(i - 52)
                                                                                  ElseIf i < 63 Then
                                                                                      ExpandedDigitArray(i) = "_"
                                                                                  Else
                                                                                      ExpandedDigitArray(i) = "/"
                                                                                  End If
                                                                              Next i
                                                                          End If
                                                                          
                                                                          If vDecimal < 0 Then
                                                                              vDecimal = -vDecimal
                                                                              bIsNegative = True
                                                                          End If
                                                                      
                                                                          Dec2BaseN_Modified = ""
                                                                          Do While vDecimal > 2 ^ 31 - 1
                                                                              ' input data isn't of type long so use
                                                                              ' this slower method to reduce it
                                                                              vDecimal = Int(vDecimal + 0.0001) / lBase
                                                                              lRemainder = CLng(lBase * (vDecimal - Int(vDecimal)))
                                                                              Dec2BaseN_Modified = ExpandedDigitArray(lRemainder) & Dec2BaseN_Modified
                                                                              vDecimal = vDecimal - lRemainder / lBase
                                                                              If bytMinPlaces > 0 Then bytMinPlaces = bytMinPlaces - 1
                                                                          Loop
                                                                          lDecimal = CLng(vDecimal)
                                                                      
                                                                          ' now that we hvae long-data remaining get size in N-BYTES
                                                                          If lDecimal > 0 Then
                                                                              Size = Size + CLng(Int(Log(lDecimal) / Log(lBase) + 1))
                                                                          Else
                                                                              Size = 1
                                                                          End If
                                                                         
                                                                          For i = 0 To Size - 1
                                                                              lRemainder = lDecimal Mod lBase
                                                                              lDecimal = lDecimal \ lBase
                                                                              Dec2BaseN_Modified = ExpandedDigitArray(lRemainder) & Dec2BaseN_Modified
                                                                          Next i
                                                                          
                                                                          If (Size < bytMinPlaces) Then
                                                                              ' now left pad with A's (asc("A") = 65)
                                                                              ' to reach minimum size
                                                                              Dec2BaseN_Modified = String(bytMinPlaces - Size, 65) & Dec2BaseN_Modified
                                                                          End If
                                                                          
                                                                          If bIsNegative Then
                                                                              Dec2BaseN_Modified = "-" & Dec2BaseN_Modified
                                                                          End If
                                                                      End Function
                                                                      
                                                                      Function FloatingAnd(ByVal vVal1 As Variant, ByVal vVal2 As Variant) As Variant
                                                                          ' built-in VBA bitwise AND only wokrs on long values
                                                                          ' this much slower function will work on any values
                                                                          ' up to 10^16 in Excel 2003
                                                                          Dim sBinVal1 As String, sBinVal2 As String
                                                                          Dim lLen As Long, lLen1 As Long, lLen2 As Long
                                                                          Dim i As Long, vAndVal As Variant
                                                                      
                                                                          sBinVal1 = Dec2BaseN_Modified(vVal1, 2, 0, True)
                                                                          sBinVal2 = Dec2BaseN_Modified(vVal2, 2, 0, True)
                                                                      
                                                                          lLen1 = Len(sBinVal1)
                                                                          lLen2 = Len(sBinVal2)
                                                                          If lLen1 <= lLen2 Then
                                                                              lLen = lLen1
                                                                          Else
                                                                              lLen = lLen2
                                                                          End If
                                                                      
                                                                          
                                                                          For i = 0 To lLen - 1
                                                                              If Mid(sBinVal1, lLen1 - i, 1) = "1" Then
                                                                                  If Mid(sBinVal2, lLen2 - i, 1) = "1" Then
                                                                                      vAndVal = vAndVal + 2 ^ i
                                                                                  End If
                                                                              End If
                                                                          Next i
                                                                          FloatingAnd = vAndVal
                                                                      End Function
                                                                      A good deal of the code would actually be superfluous in a "real" language and is only in place because VBA is unable to perform AND operations on data types other than LONG (positive values < 231-1) on my 32-but machine). Hence I extended the AND operation for floating point values. This actually wasn't strictly necessary for string of this length, but add on another character or t2o and it would be (plus I already had the code written).

                                                                      Adding the above code to an Excel VBA module, and typing =PUZZLESOLVE("LOSHAK", "ESCAZU") into a cell yields the promised value of 'CHTBI', while =PUZZLESOLVE("JJGOLD", "JERSEY") yields 'JEQTYU'.

                                                                      Please note that no form of programming was in any way necessary to solve the problem ... I just happened to have to have 3 of the 4 required functions already written in VBA, and when I mixed them together yesterday I found myself decidedly pleased that the answers came out as I had initially calculated (whew).


                                                                      Anyway, good job once again to Megaman. Well done.
                                                                      Comment
                                                                      SBR Contests
                                                                      Collapse
                                                                      Top-Rated US Sportsbooks
                                                                      Collapse
                                                                      Working...