1. #1
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    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).

  2. #2
    terpkeg
    terpkeg's Avatar Become A Pro!
    Join Date: 10-26-09
    Posts: 2,354
    Betpoints: 2434

    Syspu

  3. #3
    Data
    Data's Avatar Become A Pro!
    Join Date: 11-27-07
    Posts: 2,236

    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.

  4. #4
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Data View Post
    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.

  5. #5
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    And speaking of Data's native tongue one might conceivable write:
    CHTBIЬЖВА

  6. #6
    djiddish98
    djiddish98's Avatar Become A Pro!
    Join Date: 11-13-09
    Posts: 345
    Betpoints: 237

    Should we be converting words to binary?

  7. #7
    Data
    Data's Avatar Become A Pro!
    Join Date: 11-27-07
    Posts: 2,236

    Quote Originally Posted by Ganchrow View Post
    ЬЖВА

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

  8. #8
    Optional
    Optional's Avatar Moderator
    Join Date: 06-10-10
    Posts: 57,833
    Betpoints: 9306

    Quote Originally Posted by Ganchrow View Post
    CHTBIЬЖВА
    Beta beats 1000 BA holders?

  9. #9
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by djiddish98 View Post
    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.

  10. #10
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Data View Post


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

    Beta beats 1000 BA holders?
    Note the title of the puzzle and recall my propensity for red herrings.

  11. #11
    Dark Horse
    Deus Ex Machina
    Dark Horse's Avatar Become A Pro!
    Join Date: 12-14-05
    Posts: 13,764

    cgsbj

    (in capitals)
    Last edited by Dark Horse; 07-06-10 at 05:59 AM.

  12. #12
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Dark Horse View Post
    cgsbj

    (in capitals)
    No sir, not the answer I had in mind ... but care to share your thought process?

  13. #13
    Dark Horse
    Deus Ex Machina
    Dark Horse's Avatar Become A Pro!
    Join Date: 12-14-05
    Posts: 13,764

    if 011111+111111= 100000
    and 100000 = 10001

    then 001100+010110 = 111011
    and 111011 = 11100

  14. #14
    Dark Horse
    Deus Ex Machina
    Dark Horse's Avatar Become A Pro!
    Join Date: 12-14-05
    Posts: 13,764

    Using:
    ACEG
    BDFH etc

    and 9.99900009999 to convert.

  15. #15
    Not Matt Rain
    Nope.
    Not Matt Rain's Avatar Become A Pro!
    Join Date: 07-05-10
    Posts: 47

    Quote Originally Posted by Ganchrow View Post
    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 at 10:50 AM.

  16. #16
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Not Matt Rain View Post
    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.

  17. #17
    Not Matt Rain
    Nope.
    Not Matt Rain's Avatar Become A Pro!
    Join Date: 07-05-10
    Posts: 47

    Wonderful.

    Quote Originally Posted by Dark Horse View Post
    if 011111+111111= 100000
    and 100000 = 10001
    Whaaa? One of us is drunk.

  18. #18
    MonkeyF0cker
    Update your status
    MonkeyF0cker's Avatar Become A Pro!
    Join Date: 06-12-07
    Posts: 12,144
    Betpoints: 1127

    I can't help but think that this is some sort of XOR cipher. The solution eludes me, however.

  19. #19
    pico
    USC ml
    pico's Avatar Become A Pro!
    Join Date: 04-05-07
    Posts: 27,321
    Betpoints: 1634

    wow ganch is still here.

  20. #20
    djiddish98
    djiddish98's Avatar Become A Pro!
    Join Date: 11-13-09
    Posts: 345
    Betpoints: 237

    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.

  21. #21
    Dark Horse
    Deus Ex Machina
    Dark Horse's Avatar Become A Pro!
    Join Date: 12-14-05
    Posts: 13,764

    Quote Originally Posted by Not Matt Rain View Post
    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

  22. #22
    benjy
    Untitled
    benjy's Avatar Become A Pro!
    Join Date: 02-19-09
    Posts: 2,158
    Betpoints: 2882

    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.

  23. #23
    djiddish98
    djiddish98's Avatar Become A Pro!
    Join Date: 11-13-09
    Posts: 345
    Betpoints: 237

    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.

  24. #24
    Je_Tag
    Je_Tag's Avatar Become A Pro!
    Join Date: 05-15-10
    Posts: 1

    cough

  25. #25
    Not Matt Rain
    Nope.
    Not Matt Rain's Avatar Become A Pro!
    Join Date: 07-05-10
    Posts: 47

    Quote Originally Posted by djiddish98 View Post
    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 at 09:35 AM.

  26. #26
    Not Matt Rain
    Nope.
    Not Matt Rain's Avatar Become A Pro!
    Join Date: 07-05-10
    Posts: 47

    Maybe there's some math technicality I'm not seeing that involves the ampersand. Me math boob.

  27. #27
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Ganchrow View Post
    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.

  28. #28
    Jrod124
    Update your status
    Jrod124's Avatar Become A Pro!
    Join Date: 10-31-09
    Posts: 5,622
    Betpoints: 535

    Not sure good question!!!!!

  29. #29
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Not Matt Rain View Post
    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.

    Quote Originally Posted by Not Matt Rain View Post
    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.

  30. #30
    Not Matt Rain
    Nope.
    Not Matt Rain's Avatar Become A Pro!
    Join Date: 07-05-10
    Posts: 47

    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.

  31. #31
    Megaman
    Megaman's Avatar Become A Pro!
    Join Date: 12-11-09
    Posts: 23
    Betpoints: 384

    Jjgold & jersey =

    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 at 06:12 PM.
    Points Awarded:

    Ganchrow gave Megaman 110 SBR Point(s) for this post.


  32. #32
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Megaman View Post
    Jjgold & jersey =

    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 betpoints are being shipped your way forthwith.

    Good job.

  33. #33
    Not Matt Rain
    Nope.
    Not Matt Rain's Avatar Become A Pro!
    Join Date: 07-05-10
    Posts: 47

    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.

  34. #34
    Data
    Data's Avatar Become A Pro!
    Join Date: 11-27-07
    Posts: 2,236

    Quote Originally Posted by Megaman View Post
    Jjgold & jersey =
    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:
    http://www.google.com/search?l&q=+si...anchrow+puzzle

  35. #35
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Not Matt Rain View Post
    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.

12 Last
Top