mdbtxt1
mdbtxt2
Proceed to Safety

RIES - Find Algebraic Equations, Given Their Solution    

Quick Links
   Recent Changes
   RIES Source Code (build instructions in header comment),    MSAL (optional Maths functions Stand-alone Library),    Windows Instructions,    postfix parser,       and License: RIES License (GPL v3).
   RIES profiles (settings files):       Latin,       Mathematica
   Manual:       PDF,       PostScript,       Plain ASCII,       Source (nroff),       and License: FDL 1.3


RIES was featured on xkcd on Wed 2012.0425...

... which is ((7π+1/2 × π)2 × π)2


To use RIES, you must download the source code (links above) and compile it on your own computer.


Contents
   Overview
      RIES Profiles
      Benchmarks
      Searching for Solutions of a Restricted Class
   RIES Background and Philosophy
      Motivation and History
      Algorithm
      An Exact Answer is Unlikely
      Optimising the Bidirectional Search
      Source Code
      Windows Instructions
      Approximating Multiple Unknowns
   Detailed Examples of Restricted-Class Searches
      Searching for Integer Solutions
      Searching for Rational Solutions
      Searching for "Constructible" Solutions
      Searching for Algebraic Solutions
      Variations of the -a Option
      Chow's "Closed-Form" or "Exponential-Logarithmic" Numbers
      Liouvillian Numbers
      Elementary Numbers
   Nerdy Math Tricks
      "Classical" Approximations
      Mystical Pre-Destiny
      Four Fours
      Secret Code
      Area 51
      A Visit by Dr. Matrix
   Semiserious Math Tricks
      Formal Hypothesis
      Wild Guessing
      Successive Refinement
      Forgotten Identities
      The Broken Calculator
      Enlightened Discovery
      Debugging
      Kolmogorov Complexity
      Some Examples for Pi Day 2013
      Some Examples for Pi Day 2015
   Details and Surprises
      A Detailed Example of the RIES Algorithm
      Effects of Changing the Symbol Set
   Links
   See Also


Overview

ries (or RIES, an acronym for RILYBOT Inverse Equation Solver) takes any number and produces a list of equations that approximately solve to that number, like the following example:

bash# ries 2.5063    Your target value: T = 2.5063 mrob.com/ries    2 x = 5 for x = T - 0.0063 {49} 8 x = e^3 for x = T + 0.00439212 {66} x^2 = 2 pi for x = T + 0.000328275 {55} x^x = 1+9 for x = T - 0.000115854 {69} (x-1)^2 = tanpi(1/e) for x = T + 0.000108368 {75} x^2+e = 9 for x = T + 3.56063e-05 {63} ln(6) x = sqrt(pi)+e for x = T + 2.73037e-05 {93} x/4+1 = 4"/7 for x = T + 6.24679e-06 {91} ln(sqrt(x)-1) = -(phi/3) for x = T + 1.4647e-06 {97} 1/(1-ln(x)) = (1/e+pi)^2 for x = T - 3.89197e-07 {106} x+e"/4 = 7-sqrt(8) for x = T - 3.26098e-07 {109} x+pi/8 = 8 cospi(phi) for x = T + 3.89451e-08 {111} 1/(2-x)+1 = cospi(7"/phi) for x = T + 6.16902e-09 {116} x+1/e^(1/x) = 5^(e-2) for x = T - 2.25977e-09 {118} x sqrt(phi x) = 2(pi-1/phi) for x = T - 1.71971e-09 {126} (for more results, use the option '-l3')    e = base of natural logarithms, 2.71828... cospi(X) = cos(pi * x) ln(x) = natural logarithm or log base e tanpi(X) = tan(pi * x) phi = the golden ratio, (1+sqrt(5))/2 sqrt(x) = square root A"/B = Ath root of B pi = 3.14159...    --LHS-- --RHS-- -Total- max complexity: 67 61 128 dead-ends: 2848836 4250702 7099538 CPU time: 0.296 expressions: 228357 318227 546584 distinct: 111700 89860 201560 Memory: 12608KiB    Total equations tested: 10037362000 (1.004e+10)

Notice the answers are ordered by increasing closeness to the given number. It should also be apparent that the simplest equations tend to come first and the more complex ones later on. ries follows the example of continued fractions — as you go to longer equations, you get a closer approximaion to your number, and each approximation is the closest approximation that is available with an equation of that "complexity".

ries is highly customisable. You can have it omit functions and symbols (like the sine and cosine functions, or the symbol for phi, the Golden Ratio) if you don't want it to use them in solutions. You can give it an integer and specify that it limit its search to calculations that come out to be exact integers, and it will figure out the shortest way to construct your number from the digits 1 through 9. If you want easily inverted solutions you can specify that there be only one x on the left-hand side, omitting things like "x-sin(x)". ries can find the simplest way to (for example) express the value 27 using only the digit 4 and the four basic operators plus, minus, times and divide.

ries Profiles

It is common to want to use several ries options together, and to use the same options in many different commands. To facilitate this, ries supports the use of "profiles" specified by the -p option. A profile is a text file containing one or more ries command-line options, with whatever spacing you desire and optional comments delimited by the '#' character. Here is an example:

# old.ries Profile for all the old RIES behaviour --trig-argument-scale 1 # Radians -NT # old RIES had no tangent function -l1 # The default searchlevel was -l1 --significance-loss-margin 15 # There were no sig-loss checks

If this file is in the current directory, adding the option -pold.ries (or --include old.ries) will give nearly the same results as a pre-2012 version of ries.

Note that you can override options in a profile: the command ries 1.2345 -pold.ries -l2 overrides the -l1 option in old.ries by giving the option -l2.

Searching for Solutions of a Restricted Class

ries makes it easy to limit your search to certain well-defined types of numbers, expressions, and equations. Two popular examples are rational numbers and algebraic numbers. This table summarises the options; at the top of each column is a link to a section with details on how ries handles that specific type of number; a Y indicates that numbers in this row are found by ries using the option at the top of the column:

ries option -i -r -c -a-Ox-l - n/a
type of number integral rational constructible algebraic Chow's
"closed-form"
Liouville elementaryreal
target
integer, e.g.
1729
Y Y Y Y Y Y Y -
rational, e.g.
7/27 ≈ 0.259259...
- Y Y Y Y Y Y -
closed-form quadratic, e.g.
√(2+√3) ≈ 1.93185165257814
- - Y Y Y Y Y -
closed-form algebraic, e.g.
(2+√3)(1/3) ≈ 1.55113351807125
root of x3+x-3=0 ≈ 1.21341166276223
root of x4+x-3=0 ≈ 1.16403514028977
- - - Y Y Y Y -
implicit algebraic, e.g.
root of x5-x+1=0 ≈ -1.16730397826142
- - - Y - Y Y -
closed-form algebraic, exponent and/or logarithm, e.g.
22 ≈ 1.63252691943815
e2(1/Φ) ≈ 4.64031500910231
- - - - Y Y Y -
implicitly-defined algebraic, exponential, and/or logarithm, e.g.
root of xx-7=0 ≈ 2.31645495878561
root of x+ex=0 ≈ -0.567143290409784
root of x-cos(πx)=1 ≈ 0.623032990606725
- - - - - - Y -
transcendental, e.g.
Gamma[1/3] ≈ 2.67893853470774
- - - - - - - -

For more on how to use ries for each of these types of problems, select the links: integral,    rational,    constructible,    algebraic,    Chow's
"closed-form"
,    Liouville,    and    elementary.

  


. . . Forward to page 2 . . . Last page (page 6)



Contents: ries overview Benchmarks History    Nerdy Math Tricks    Semiserious Math Tricks    Links and miscellaneous


Robert Munafo's home pages on AWS    © 1996-2024 Robert P. Munafo.    about    contact
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Details here.

This page was written in the "embarrassingly readable" markup language RHTF, and some sections were last updated on 2024 May 20. s.30