LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > astrogeek
User Name
Password

Notices


New Years Puzzle Interesting four-digit permutations
Old

New Years Data To DB - Arithmetic, Graphs and Relations

Posted 03-14-2019 at 04:58 PM by astrogeek
Updated 03-15-2019 at 12:14 PM by astrogeek (Forgot aggregate column)

... Or, How To Get From Arithmetic to Relational Algebra and Enjoy The Trip!

Quote:
Originally Posted by dogpatch View Post
I found the 'NP Complete' link quite interesting, even though i still don't fully grasp the concept, nor your explanations about sets, etc.
I would very much like to try to explain some of the ideas of sets, how those are important to some aspects of our fun with the newyears puzzle, and why that takes us into the domains of graph theory and relational databases. In doing so, I do not pretend...
Moderator
Views 1492 Comments 0 astrogeek is offline
Old

New Years Data To DB - The Model and The Data

Posted 03-12-2019 at 03:48 PM by astrogeek
Updated 03-12-2019 at 05:02 PM by astrogeek (typos)

With a now complete solution set and minimal set of generating expressions, it seems reasonable to think about inserting these into a relational database in order to more easily explore the landscape. To do so we need a normalized data model to query, and methods of capturing the data into the model or schema, both of which are easily within reach.

First, it is important to realize how many unique result sets there are, and how these are related to the ten thousand four digit "years"....
Attached Images
File Type: gif newyear.gif (20.4 KB, 11 views)
Attached Files
File Type: txt years_v1.1.0.tar.gz.txt (16.2 KB, 2 views)
Moderator
Views 1722 Comments 2 astrogeek is offline
Old

New Years Data to DB - The Idea

Posted 02-28-2019 at 02:33 AM by astrogeek

The initial efforts of all participants in the newyears thread, and comparison and validation of the results produced by the three different approaches to the problem, have led us to agreement that we have indeed found a complete set of solutions. At least complete within the bounds of our combined ability to imagine and test generating expressions to this point!

Knowing what a complete solution set looks like, we have each shifted emphasis from the generating code, to a more critical...
Moderator
Views 1340 Comments 0 astrogeek is offline
Old

New Years Puzzle, Fractional Math and More...

Posted 02-08-2019 at 02:10 AM by astrogeek
Updated 02-22-2019 at 04:43 PM by astrogeek (Reorganizing categories)

Updated 2/17: New code now available, minimal expression set, see below...

The continuing saga fo the New Years Puzzle and Programming Challenge.

Member Beryllos who originally opened the thread discovered that some solutions were missed (and possibly other invalid solutions included) as a result of math errors intrinsic to floating point math. They very correctly identified integer math, math using only integer fractions, as the necessary solution. In the face of some...
Attached Images
File Type: png ast1.png (25.5 KB, 11 views)
File Type: png ast2.png (19.5 KB, 13 views)
File Type: png years_vs_solns_complete_v1.0.2.png (21.2 KB, 6 views)
Attached Files
File Type: txt years_minimal_v1.0.2.tar.gz.txt (71.9 KB, 4 views)
Moderator
Views 1881 Comments 0 astrogeek is offline
Old

New Year Puzzle

Posted 01-04-2019 at 07:43 PM by astrogeek
Updated 02-22-2019 at 04:41 PM by astrogeek (Reorganizing categories)

NOTE: See updates at bottom of this post - last 1/5/19

Way back around new year's day during the winter of '19 (remember that kiddies?), LQ member Beryllos posted a New Year Puzzle and programming challenge in the Programming forum.

The goal of the puzzle is to generate as many whole numbers as possible between 0 and 100 using only the digits of the year, 2,0,1 and 9 in simple constant arithmetic expressions such as 9 * (10 - 2).

The rules are simple,...
Moderator
Views 1458 Comments 0 astrogeek is offline

  



All times are GMT -5. The time now is 02:08 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration