Index | Recent Threads | Unanswered Threads | Who's Active | Guidelines | Search |
World Community Grid Forums
Category: Community Forum: Chat Room Thread: Weekend Puzzles |
No member browsing this thread |
Thread Status: Active Total posts in this thread: 269
|
Author |
|
alanb1951
Veteran Cruncher Joined: Jan 20, 2006 Post Count: 858 Status: Offline Project Badges: |
Sgt. Joe,
I tried to only comment on part of the "what do you see in it" (whilst hinting that I knew an answer) with as little steering as possible... I obviously overdid it :-) -- sorry about that (geek/nerd behaviour!) That still leaves understanding its purpose and its relevance/usefulness, I think... :-) Cheers - Al. P.S. It will be interesting to see Adri's eventual answer! If it needs to be technical, how technical will it be :-) |
||
|
Sgt.Joe
Ace Cruncher USA Joined: Jul 4, 2006 Post Count: 7545 Status: Offline Project Badges: |
Sgt. Joe, I tried to only comment on part of the "what do you see in it" (whilst hinting that I knew an answer) with as little steering as possible... I obviously overdid it :-) -- sorry about that (geek/nerd behaviour!) That still leaves understanding its purpose and its relevance/usefulness, I think... :-) Cheers - Al. P.S. It will be interesting to see Adri's eventual answer! If it needs to be technical, how technical will it be :-) The best hint was in the first three words. Cheers
Sgt. Joe
*Minnesota Crunchers* |
||
|
adriverhoef
Master Cruncher The Netherlands Joined: Apr 3, 2009 Post Count: 2069 Status: Offline Project Badges: |
Dear puzzle friends, it's time again for the sweet words of salvation. (I don't know if I can say "redeeming words" here, I tried to translate "verlossende woorden". In Dutch, 'oplossing' (solution) en 'verlossing' (salvation, redemption, deliverance, release) are obviously close friends. In German, one of the offered translations was "süßen Worte der Erlösung", that's why I chose "sweet words of salvation".)
----------------------------------------The concerning question was this line: s/:/*5*73+/;s/^/(/;s/:/)*2*3*4+/;s/^/(/;s/:/)*3*4*5+/;s/^/(/;s/:/)*2*5*6+/ Here's the solution. The expression in the puzzle uses a series of substitution operations, inspired by a regular expression syntax, to transform a certain string. Let's simplify the expression. There are four sets of what seems to look like multiplications: 5*73 = 365 2*3*4 = 24 3*4*5 = 60 2*5*6 = 60 Do you see a pattern here? A year consists of 365 days, a day has 24 hours, an hour lasts 60 minutes and one minute can be broken down into 60 seconds. So we could rewrite this thing as s/:/*365+/;s/^/(/;s/:/)*24+/;s/^/(/;s/:/)*60+/;s/^/(/;s/:/)*60+/Apart from the four remaining multiplications, also four colons can be found in the expression. So if we have a string like y:d:h:m:s, with four colons in it, representing the number of years (y), days (d), hours (h), minutes (m) and seconds (s), we might be able to transform the string using the substitution operations. Why y:d:h:m:s? Perhaps because you can see this string all over the place on WCG's website, representing total runtime. Most of the time as y:d:hh:mm:ss, sometimes only in seconds. Let's take an example. On your Overview page, underneath "My activity over time", there is a download button, and if you are part of a team, there is also a download button underneath "My team history". The first one will download a file named 'history.csv', the second one downloads 'teams.csv'. Both files have a column named "runtimeInSeconds". Now, let's say you're part of a team, then you will see on your Overview page a (total) Runtime, e.g. "324:283:16:57:47", and in the downloaded file 'teams.csv' you will see 'runtimeInSeconds' as "10242176267". Wouldn't it be nice[*1] if these figures are matching numbers? So, let's break it down step by step, using the series of substitutions on this: 324:283:16:57:47 s/:/*5*73+/; (5*73 = 365) s/^/(/; - replacing a colon (':') with "*365+" and prepending an opening parenthesis '(' => (324*365+283:16:57:47 s/:/)*2*3*4+/; (2*3*4 = 24) s/^/(/; - replacing a colon with ")*24+" and prepending an opening parenthesis '(' => ((324*365+283)*24+16:57:47 s/:/)*3*4*5+/; (3*4*5 = 60) s/^/(/; - replacing a colon with ")*60+" and prepending an opening parenthesis '(' => (((324*365+283)*24+16)*60+57:47 s/:/)*2*5*6+/ (2*5*6 = 60) - replacing a colon with ")*60+" => (((324*365+283)*24+16)*60+57)*60+47 Let's do the math[*2]: 10242176267 And so, indeed, this value of "runtimeInSeconds" (10242176267) matches "324:283:16:57:47" exactly! Al, Sgt. Joe, and anyone else who took the time to try my puzzle, thank you very much for participating! Adri [*1] https://youtu.be/lD4sxxoJGkA [*2] E.g. on the commandline, you can use: echo 324:283:16:57:47 | sed 's/:/*365+/;s/^/(/;s/:/)*24+/;s/^/(/;s/:/)*60+/;s/^/(/;s/:/)*60+/' | bcor: echo $(($(echo 324:283:16:57:47 | sed 's/:/*365+/;s/^/(/;s/:/)*24+/;s/^/(/;s/:/)*60+/;s/^/(/;s/:/)*60+/'))) [Edit 5 times, last edit by adriverhoef at Aug 21, 2024 3:08:05 PM] |
||
|
alanb1951
Veteran Cruncher Joined: Jan 20, 2006 Post Count: 858 Status: Offline Project Badges: |
Adri,
Thanks for that explanation: I hadn't bothered to parse it out in full detail, so it was nice to know what it was being used to analyse! I should've realized the 365 was likely to apply to a count of years rather than a year-number, so my tools for date processing would not actually have done for the application you suggested; indeed, I'd probably do the same (but inside a Python script, so different syntax!) :-) Again, thanks for giving us something to think about :-) Cheers - Al. P.S. I do a lot of calculations of the number of seconds between two fully-specified UTC dates and I use system routines for those so I don't have to worry about leap years or ill-formatted dates (WCG old API, I'm looking at you!.. [31st November, anyone?]) |
||
|
Sgt.Joe
Ace Cruncher USA Joined: Jul 4, 2006 Post Count: 7545 Status: Offline Project Badges: |
I had thought about the possibility the asterisks represented multiplications, but I talked myself out of it. If I had bothered to actually work out a couple of them as multiplications, it may have started to make sense.
----------------------------------------I do have some routines in a couple of spreadsheets to convert seconds to y:d:m:s format,, and the y:d:m:s format to seconds, but I use several columns to do both in a series of steps. Interesting puzzle. Thanks
Sgt. Joe
----------------------------------------*Minnesota Crunchers* [Edit 1 times, last edit by Sgt.Joe at Aug 22, 2024 1:26:40 AM] |
||
|
adriverhoef
Master Cruncher The Netherlands Joined: Apr 3, 2009 Post Count: 2069 Status: Offline Project Badges: |
Dear puzzle friends, welcome!
This weekend's puzzle is a bit early and believe me, it will create havoc, almost right from the beginning! Here it is: M Good luck! Adri PS Solution will be posted in a week. |
||
|
Sgt.Joe
Ace Cruncher USA Joined: Jul 4, 2006 Post Count: 7545 Status: Offline Project Badges: |
An interesting puzzle which does not lead to any initial quick solutions. Just some observations which come to mind and probably lead nowhere.
----------------------------------------The initial "M" seems to a bit out of place with the numbers, but it is the 13th letter of the alphabet. It is a capital "M" but it could indicate mass in physics but I don' see any masses of any subatomic particles in any units with which I am familiar. And that would usually be a lower case "m". The capital "M" could stand for "Mega" (10^6). Or it could stand for molarity in chemistry, but that is way out of my wheelhouse. It is also the Roman numeral for 1,000. It is also placed directly over the leftmost column. The first and the last numbers have leading zeroes which may be significant, but maybe not. The first and third numbers lead me to think in binary, but that does not really help much because the rest of the numbers are definitely not binary. The vertical stacking may indicate place value, but that may be irrelevant. There is no apparent pattern to the even/odd spacing of the numbers. I don't see any pattern for any constants with which I am familiar. Nothing stands out for measurement in any units I think of at the moment. To sum up at this time, there has been no progress for me on this conundrum. Thanks for posting it. Cheers
Sgt. Joe
*Minnesota Crunchers* |
||
|
alanb1951
Veteran Cruncher Joined: Jan 20, 2006 Post Count: 858 Status: Offline Project Badges: |
Adri,
----------------------------------------Because I have been spending a lot of time watching what was happening to ARP1 as it struggled to catch up, everything looked like parts of task names and dates for a while. Then I realized I was looking at it in the wrong way :-) -- thanks to Sgt. Joe for triggering that thought! If that second number should be 38159 I think I know what this is about... Otherwise, I'm at a complete loss :-) Cheers - Al. [Edit 1 times, last edit by alanb1951 at Nov 22, 2024 6:06:45 PM] |
||
|
adriverhoef
Master Cruncher The Netherlands Joined: Apr 3, 2009 Post Count: 2069 Status: Offline Project Badges: |
If that second number should be 38159 I think I know what this is about... You're right, Al, I'm sorry for the mistake. You're clever and getting a standing ovation!The second number should indeed be 38159 instead of 37159. Adri |
||
|
alanb1951
Veteran Cruncher Joined: Jan 20, 2006 Post Count: 858 Status: Offline Project Badges: |
If that second number should be 38159 I think I know what this is about... You're right, Al, I'm sorry for the mistake. You're clever and getting a standing ovation!The second number should indeed be 38159 instead of 37159. Adri I've got a hint lined up for later on if Sgt. Joe is still stuck after the change :-) Cheers - Al. [Edit 2 times, last edit by alanb1951 at Nov 23, 2024 3:17:11 AM] |
||
|
|