Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: The MYTH of UNCOMPUTABLE FUNCTIONS
Replies: 4   Last Post: Jan 14, 2013 5:20 PM

 Messages: [ Previous | Next ]
 Graham Cooper Posts: 4,495 Registered: 5/20/10
Re: The MYTH of UNCOMPUTABLE FUNCTIONS
Posted: Jan 14, 2013 5:20 PM

On Jan 14, 10:40 pm, Rupert <rupertmccal...@yahoo.com> wrote:
> On Monday, January 14, 2013 6:59:51 AM UTC+1, Graham Cooper wrote:
> > On Jan 14, 2:16 pm, Rupert <rupertmccal...@yahoo.com> wrote:
>
> > > On Sunday, January 13, 2013 10:57:26 PM UTC+1, Graham Cooper wrote:
>
> > > > On Jan 14, 7:09 am, Rupert <rupertmccal...@yahoo.com> wrote:
>
> > > > > On Sunday, January 13, 2013 9:37:46 PM UTC+1, Graham Cooper wrote:
>
> > > > > > On Jan 14, 6:13 am, Rupert <rupertmccal...@yahoo.com> wrote:
>
> > > > > > > On Sunday, January 13, 2013 9:04:31 PM UTC+1, Graham Cooper wrote:
>
> > > > > > > > On Jan 13, 7:30 pm, Rupert <rupertmccal...@yahoo.com> wrote:
>
> > > > > > > > > On Saturday, January 12, 2013 10:48:43 PM UTC+1, Graham Cooper wrote:
>
> > > > > > > > > > Turing's Halt Proof clearly proves that
>
> > > > > > > > > > HALT( program, input )  --> [yes/no]
>
> > > > > > > > > > is not a PURE FUNCTION!
>
> > > > > > > > > How do you define "pure function"?
>
> > > > > > > > the output is determined by the input alone
>
> > > > > > > > Here is a function that imports CAMGIRLS Sales data to the AFFILIATE
>
> > > > > > > > PROGRAM
>
> > > > > > > > function(\$result)
>
> > > > > > > > {
>
> > > > > > > > \$myxml = simplexml_load_string(\$response);
>
> > > > > > > > \$qid = \$myxml->SignupData['QueryId'];
>
> > > > > > > > if (\$qid == 'camgirls-com') {
>
> > > > > > > > \$host="mysql.camaffiliate.com"; // Host name
>
> > > > > > > > \$username="camaff"; // Mysql username
>
> > > > > > > > \$password="*********"; // Mysql password
>
> > > > > > > > \$db_name="afftrail"; // Database name
>
> > > > > > > > \$tbl_name="pa_transactions"; // Table name
>
> > > > > > > > // Connect to server and select database.
>
> > > > > > > > mysql_connect("\$host", "\$username", "\$password")or die("cannot connect
>
> > > > > > > > to server ");
>
> > > > > > > > mysql_select_db("\$db_name")or die("cannot select DB");
>
> > > > > > > > \$assets = \$myxml->SignupData;
>
> > > > > > > > \$html = '<ul>'."\n";
>
> > > > > > > > foreach (\$assets->Data as \$asset) {
>
> > > > > > > >     \$html .= '<li>' . \$asset['SignupTime'] . ' ' .
>
> > > > > > > > \$asset['TrackingID'] . ' ' . \$asset['UserID'] . '</li>' . "\n";
>
> > > > > > > >     \$sut = \$asset['SignupTime'];
>
> > > > > > > >     \$tid = \$asset['TrackingID'];
>
> > > > > > > >     \$uid = \$asset['UserID'];
>
> > > > > > > > \$sql="SELECT * FROM \$tbl_name WHERE transid=" . \$uid;
>
> > > > > > > > \$result=mysql_query(\$sql);
>
> > > > > > > > \$rows=mysql_fetch_array(\$result);
>
> > > > > > > > \$userthere=\$rows['transid'];
>
> > > > > > > > // if table has no UserID value
>
> > > > > > > > if(empty(\$userthere)){
>
> > > > > > > > \$sql1="INSERT INTO \$tbl_name(transid, dateinserted, totalcost,
>
> > > > > > > > affiliateid) VALUES('\$uid','\$sut',80,'\$tid')";
>
> > > > > > > > \$result1=mysql_query(\$sql1);
>
> > > > > > > > }
>
> > > > > > > > }//end foreach
>
> > > > > > > > \$html .= '</ul>'."\n";
>
> > > > > > > > //    echo \$html;
>
> > > > > > > > mysql_close();
>
> > > > > > > > }
>
> > > > > > > > But the results of the function are not determined only by the input
>
> > > > > > > > If a new client has already been added... then it is not added a 2nd
>
> > > > > > > > time!
>
> > > > > > > > // if table has no UserID value
>
> > > > > > > > if(empty(\$userthere)){
>
> > > > > > > > *********************************
>
> > > > > > > > You can CHANGE a function with global variables and side effects into
>
> > > > > > > > a PURE FUNCTION
>
> > > > > > > > by adding more parameters into the parameter list.
>
> > > > > > > > Herc
>
> > > > > > > Are you talking about a mathematical function or a function that can be computed by a computer?
>
> > > > > > Can you state the difference?
>
> > > > > > Herc
>
> > > > > A function from a set A to a set B is an arbitrary rule, which, given a member of A, gives you a unique member of B. There does not need to be an algorithm which will compute the outcome of the rule.
>
> > > > you just substituted the word computer with algorithm
>
> > > > Herc
>
> > > You want me to define "algorithm"? Why don't you read a textbook on recursion theory?
>
> > Because "Recursion Theory" whatever theory that may be
>
> > is just a bunch of idiots putting the word "Recursive" before 20
>
> > different other idiotic maths terms about phantom bullshit
>
> No, it's not.
>
>
>
>
>
>
>
>
>
>
>

> > when the Authors and their Sap Students couldn't even program a FOR
>
> > LOOP yet alone a recursive program.
>
> > Here is a RECURSIVE 5TH GENERATION LANGUAGE construct for SUBSET
>
> > capable of implementing the FORALL QUANTIFIER that is executable via
>
> > reverse Modus Ponens to any Axiomatic base.
>
> > PROLOG+    A CONCEPT DATABASE MANAGEMENT LANGUAGE  (DBML)
>
> > We add simple breadth first extensions to PROLOG CLAUSES.
>
> > Y>   next record
>
> > Y<   prev record
>
> > Y>>  last record
>
> > Y<<  1st record
>
> > AXIOM OF FINITE SUBSETS
>
> > -----------------------
>
> > subs(A,X,Y) <- e(A>>,X) ^ e(A,Y).
>
> > subs(A,X,Y) <- e(A,Y) ^ e(A>,X) ^ subs(A,X,Y).
>
> > ss(X,Y) <- e(A<<,X) ^ subs(A,X,Y).
>
> > AXIOM OF FINITE SET EQUALITY
>
> > ----------------------------
>
> > equals(X,Y) <- ss(X,Y) ^ ss(Y,X).
>
> > e.g.
>
> > ?- ss(rower,male).
>
> > YES
>
> > ?- equals(rower,male).
>
> > NO
>
> > *****************
>
> > Considering you are incapable of spotting the RECUSION
>
> > in this tiny bit of code, yet alone the FOR LOOP
>
> > it emulates, processing through each record
>
> > subs(A,X,Y) <- e(A>>,X) ^ e(A,Y).
>
> > subs(A,X,Y) <- e(A,Y) ^ e(A>,X) ^ subs(A,X,Y).
>
> > ss(X,Y) <- e(A<<,X) ^ subs(A,X,Y).
>
> > and the term 'pure function' eludes you
>
> > maybe it is you who should sit back and do some reading?
>
> The fact that I don't know Prolog has nothing to do with it.
>

These are just LOGIC PREDICATES

subs(A,X,Y) <- e(A>>,X) ^ e(A,Y).
subs(A,X,Y) <- e(A,Y) ^ e(A>,X) ^ subs(A,X,Y).
ss(X,Y) <- e(A<<,X) ^ subs(A,X,Y).

where A> means the next value in the relation e(A>,X)

****

The Topic is about whether:

S: if stops(S) gosub S

actually PROVES THE CONCEPT OF UN-COMPUTABILITY

Your Query on whether the functions are computable or not is out of
scope for this topic unless you can show some distinction between
'rule' and 'algorithm'.

All you guys ever do is BACKWARDS ENGINEER corrections via the
assumptions that are now being put into question.

Herc

Date Subject Author
1/14/13 Graham Cooper
1/14/13 Graham Cooper