Solving Math Puzzles with data.tree
I got a note from Karim Lahrichi, who even thinks about math when he’s supposed to be drinking beer. The bar puzzle they were trying to solve goes like this: Using all of the numbers 1, 3, 4, 6 exactly once, and any combination of: addition, subtraction, multiplication and division (and parenthesis to group operations however you like), arrive at the number: 24.
Sounds easy, right? Until you try to find the answer…
Luckily, he remembered the puzzle the next morning, and had a systematic go at it. He used data.tree to do a brute force solution. Read all about it on RPubs.
The post Solving Math Puzzles with data.tree appeared first on ipub.
To leave a comment
for the author, please follow the link and comment on their blog: R – ipub
offers daily e-mail updates
news and tutorials
on topics such as: Data science
, Big Data, R jobs
, visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook