Sunday, May 10, 2015

What is this blog?

I did this blog in purpose to show my work during the class " Generative Process and Formal Systems " . In this class we learned about formal systems, fractals, lambda calculations, propositional calculus, context free grammar and others subjects. Here you will find all my problem sets based in the book : GEB: an Eternal Golden Braid. And some problem sets based in class notes.
You also will find all music productions and presentations that I did during the course. Moreover, on the right there is two extras pages 'Escher"  and "Fractals". I hope you enjoy the stuff that you can see here, and sorry about my English, I am just a Brazilian international student who loves computer science and math ;D.

"I study Mathematics as a product of the human mind not as absolute." (Emil Post, 1920)

Tuesday, April 21, 2015

Logical Forms +

1)      Write a paragraph which says something significant about Jacques Herbrand and his contribution to symbolic logic.
R) Jacques Herbrand made contributions to mathematical logic creating the Herbrand`s theorem that stablishes a link between quantification theory and sentential logic which is important in that it gives a method to test a formula in quantification theory by successively testing formulas for sentential validity.
2)      Write a paragraph which says something significant about Alfred Horn and his contribution to symbolic logic.
R) Alfred Horn wrote the paper “On sentences which are true of direct unions of algebra”, and in this paper he describes Horn Clauses and Horn sentences. Later that clauses turned into the foundation of logic programming.
3)      Write a paragraph which says something significant about John Alan Robinson and his contribution to symbolic logic.
R) John Alan Robinson major contribution is to the foundation of automated theorem proving. Robinson also created the resolution principle. In 1996 he received the Herbrand Awards because of his research.
4)      Define disjunctive normal form.
R) A formula is said to be in disjunctive normal form if it has this form F1 \/ F2 \/ ….. Fn. Where each F is a conjunction of literals. Example: ( P /\ Q )\/( Q /\ P).
5)      Transform the following into disjunctive normal forms:
a)      (~P /\ Q) -> R
~(~P /\ Q ) \/ R    LQ2
 ( P \/ ~Q) \/ R      LQ5

b)      ~(P \/ ~Q)/\ (S ->T)
~(P \/ ~Q) /\ ( ~S \/ T) LQ2
 ( ~P /\ Q) /\ ( ~S \/ T)  LQ4
((~P /\ Q) /\ ~S) \/ (( ~P /\ Q) /\ T))   LQ7

c)       (P -> Q ) -> R
( ~P \/ Q) -> R LQ2
~( ~P \/ Q) \/ R   LQ2
( P/\ ~Q) \/ R    LQ4
6)      Define conjunctive normal form
R) Conjunctive normal form if it has this form F1 /\ F2 /\ ….Fn. Where each F is a disjunction of literals. Example: (p\/q) /\ ( p\/ q)
7)      Transform the following into conjunctive normal forms:
a)      P \/ (~P /\ Q /\ R)
(P \/ ~P) /\ ( P \/ Q) /\ (P \/ R)   LQ6
 True /\ ( P \/ Q) /\ ( P \/ R)

b)      ~(P -> Q)
~( ~ P \/ Q)   LQ2
(P /\ ~Q) LQ4

c)       (P -> Q) -> r
( ~P \/ Q) -> r LQ2
~( ~P \/ Q) \/ R LQ2
( P /\ ~Q) \/ R  LQ4
(R \/ P) /\ ( R \/ ~Q) LQ6

8)      State the resolution principle
                R) any two clauses C1 and C2, if there is a literal L1 and C1 that is complementary to a literal L2 in C2,then delete L1 and L2 from C1 and C2 , and construct disjunction of the remained clauses .The constructed clause is called the resolve of C1 and C2              
9)      Define what is meant by resolution deduction
R) Given a set S of clauses, a resolution deduction of clause C from S is a finite sequence C1,C2,…Cn
Of clauses such that C = cn and each Ci is either a clause in S or A resolve of clauses preceding Ci, A deduction of square from S is said to be a proof of j.

10)   Show by means of resolution that the formula U is logical consequence of the three formulas ( P ->S) and ( S -> U) and P
R)
1) (P -> S) part of G
 2) (S -> U) part of G
3) P part of G
4) ~U negation of Goal
5) (~P \/ S)  DNF
6) (~S \/ U) DNF'
7) S ( Resolving of 5+3)
8)~S(Resolving of  6+4)
9) SQUARE

11)   Show by means of the inconsistency truth table approach that the formula U is  a logical consequence of the three formulas ( P->S) and ( S -> U) and P
R)

12)   Define Horn clause
R) A Horn clause is a clause (a disjunction of literals) with at most one positive, unnegated  , literal. Conversely, a disjunction of literals with at most one negated literal is called a dual-Horne Clause.
13)   Can the formula ( P/\ Q /\ R) -> s be converted to a Horn clause
R) Yes.
~(P /\ Q /\ R) \/ S
(~P /\ ~Q /\ ~R ) \/ S
(~P \/ S) /\ (~Q \/ S) /\ (~R\/S)

(P -> S) /\ ( Q -> S) /\ (R -> S)

Thursday, April 2, 2015

Propositional Calculus Problem Set

1.       Draw a set of recursive transition networks which define well-formed formulas in the propositional calculus
R:
2.       Thinking of the propositional calculus in the terms that Hofstadter presents it, that is, as the formal system he constructs in the chapter:
a)      How many axioms in the formal system?
R: Infinite axioms
b)      How many rules in the formals system
R:Nine
c)       What are the names that he gives to these rules?
R: Joining, Separation, Double-tilde, Fantasy, Carry-over, Detachment, Contrapositive, De Morgan`s. Switcheroo
d)      What is the one rule that you absolutely must use if you are to derive a theorem in this system?
R: The fantasy rule.

3.       Write down each of the rules of the system, just as Hofstadter does on page 187.
R: Joining Rule: If x and y are theorems, then < x /\ y > is a theorem
Separation Rule: if <x /\ y> is a theorem, then both x and y are theorems
Double-Tilde Rule: The string ‘ ~~’ ‘ can be deleted from any theorem. It can also be inserted into any theorem, provided that the resulting string is itself well-formed
Fantasy Rule: If y can be derived when x is assumed to be a theorem, then < x ) y > is a theorem
Carry-Over Rule: Inside a fantasy, any theorem from the reality one level higher can be brought in and used.
Rule of Detachment: If x and < x ) y> are both theorems, then y is a theorem
Contrapositive Rule: <x ) t> and < ~x) ~ y > are interchangeable
De Morgan`s Rule: <~x /\ ~y> and ~< x \/ y> are interchangeable
Switcheroo Rule: <x \/ y> and <~x http://www.somatematica.com.br/figuras/simbolos/contem.gif Y> are interchangeable
4.       Derive <<< P /\ Q > /\R > http://www.somatematica.com.br/figuras/simbolos/contem.gif < P /\ <Q /\ R >>>
R: (1)[                                    push
     (2)<<P/\ Q> /\R>        premise
     (3)P                                   separation
     (4)Q                                  separation
     (5)R                                   separation
     (6)Q/\R                           joining
     (7)<P /\ <Q /\R>>       joining
     (8)]                                    pop
      (9)<<<P/\Q>/\R>  http://www.somatematica.com.br/figuras/simbolos/contem.gif  < P /\<Q/\R>>>            fantasy rule
5.       Derive <<< P \/ Q > http://www.somatematica.com.br/figuras/simbolos/contem.gif < P \/ Q >>
R: (1)[                    push
    (2)<P\/Q>       premise
    (3)      [              push
    (4)      P\/Q      premise
    (5)      ]              pop
    (6)]                     pop
    (7) <<P \/Q> http://www.somatematica.com.br/figuras/simbolos/contem.gif <P \/Q>>       fantasy rule
6.       Derive a theorem in the propositional calculus that you think is a little bit interesting, one that neither I asked you to derive nor Hofstadter derived in his book
R: (1)[                                    push
(2)  P/\Q                              premise
(3) P                                       separation
(4)Q                                       separation
(5)          [                              push again
(6)                          ~P           premise
(7)          ]                              pop
(8)~P -> Q                           fantasy rule
(9) P \/ Q                             Switcheroo
(10)]                                      pop
(11)P /\Q -> P \/ Q           fantasy rule

7.       As Hofstadter mentions mid-way through the chapter, there is a decision procedure for WFFs in the propositional calculus, the method of truth tables. Learn what this method entails, if you are not already clear that, and write a description of the method that is clear and complete enough that one could easily apply it by referencing your description. That is, describe the process featuring truth tables by which one could determine whether or not a WFF is a theorem in the propositional calculus.
R: 1: Count how many variables you have.
2: Do 2^numberOfVariables. This is going to tell you how many rows your truth table will have
3: Create a column to each variable
4: Now you know the number of rows, make all possible combinations of values True(T or 1) and False(F or 0) using the column of yours variables
5: Look at the operators of your WFF and do the operations:
                Negation: (~F) is true if F is false, false if F is true
                Conjunction: (F and G) is true if both F and G are true. False otherwise
                Disjunction:  ( F V G) is true if at F or G are true. False otherwise.
                Implication: (F -> G) is true unless F is true and G is false
                Equivalence : ( F <-> G)  is true if F and G have the same value
                6: A formula F is said to be true under interpretation if F(formula) evaluates to true in the                 interpretation. Otherwise it is False in the interpretation


8.       Using the truth table based decision procedure, show that he heads will be cut off! Perhaps I should say a bit more, I Am referring to the section on Gantos Ax. And I am assignin you to show by means of a truth table that he following WFF is a theorem <<< P -> Q > /\ < ~P ) Q>> -> Q>
R:
P Q  P->Q    /\     ~P -> Q   ->Q
F F      T         F             F          T
T F      F         F             T          T
F T      T         T             T          T
T T      T         T             T          T

9.       Choose another interpretation for P and Q in Ganto`s statement – one that does not involve heads or axes. Write down the words for your proposition P. Write down the words for your proposition Q. Write down a sentence corresponding to Ganto`s Statement ( what he says to the praying monks) under your interpretation.
R: P= someone go back in the past
Q= the history will change
If someone go back in the past the history will change, and if someone do not go back in the past the history will also change.
10.   Write down in a meaningful manner, in no more than a few sentences, what you think is the most salient idea that Hofstadter has embedded in the text contained within the section titled Shortcuts and Derived Rules
R: Use shortcuts ( Derived Rules) can look like a good idea and seems reasonable, the problem is, once you use a derived rule the system will lose his formality because this rules are derived working outside the system.
11.   Write down in a meaningful manner, in no more than a few sentences, what you think is the most salient idea that Hofstadter has embedded in the text contained within the section titled Formalizing Higher Levels
R: Never mix levels of understanding. Identify when you are working in M-Mode and I-Mode is important.
12.   Write down in a meaningful manner, in no more than a few sentences, what you think is the most salient idea that Hofstadter has embedded in the text contained within the section titled Reflections on the Strengths and Weakness of the System
R: The propositional calculus is a simple system that produce very simple concepts, but it can be changed to incorporate new symbols and new rules.
13.   Write down in a meaningful manner, in no more than a few sentences, what you think is the most salient idea that Hofstadter has embedded in the text contained within the section titled Proofs vs Derivations
R: A derivation and a proof are “simple” in complementary senses of the word.
14.   Write down in a meaningful manner, in no more than a few sentences, what you think is the most salient idea that Hofstadter has embedded in the text contained within the section titled The handling of contradictions
R: Contradiction is a major source of clarification and progress in all domains of life.
15.   Opinion about the chapter

R:  I did like the chapter, the way that Hofstadter shows the propositional calculus and how simple and strong it can be if you understand how to use and do not pass its limitations. For me, the fantasy (push or pop) is really reasonable and I like this rule. 

PDF

Tuesday, March 31, 2015

L-System Melody Assignment

To this assignment I am using the following L-System:
Koch Curve
Example:
Vocabulary: {A, B, C}
Start: A
Productions... A-> A B A C A C A B A
B-> B
C-> C
Derivation: G0= A
G1= A B A C A C A B A
G2= A B A C A C A B A B A B A C A C A B A C A B A C A C A B A C A B A C A C A B A B A B A C A C A B A

 For my melody, I will use G1.
A B A C A C A B A
My notes:
A=FQ AQ CQ AQ DQ CQ EQ DW
B=DQ EQ DQ EQ GQ
C=DQ FW DQ DQ FQ DQ

Final melody:

Title:

"This is far from a melody"

FQ AQ CQ AQ DQ CQ EQ DW DQ EQ DQ EQ GQ FQ AQ CQ AQ DQ CQ EQ DW DQ FW DQ DQ FQ DQ FQ AQ CQ AQ DQ CQ EQ DW DQ FW DQ DQ FQ DQ FQ AQ CQ AQ DQ CQ EQ DW DQ EQ DQ EQ GQ FQ AQ CQ AQ DQ CQ EQ DW


 Song

Monday, March 23, 2015

The ND (L-Tree+ CFG) melody generation task

Steps: 
  1) Generate the L-Treedefined by the following two sproot growing processes :

A|_ a _|B      B|_ b _|A

2)      Draw the three of level 5
3)      Twice derive a string of terminals from nonterminal BAR 3 in CFG for  that we have been  using – arranging for two different sequence  to result
4)      Associate A with the result of one bar 3 derivation associate B with the other result of bar 3 derivation.
5)      Replace each instance of A and B in the level 5 of the tree.
6)      Write down the melody that is generated as a sequence of JFugue symbols
7)      Generate a sound file

Result of each step:

1-2)
3)
Bar3 => (3 p3 d3)
            => (12) (3 pitch pitch pitch d3)
            => (26) (3 f pitch pitch d3)
            => (25) (3 f e pitch d3)
            => (28) ( 3 f e a d3)
            => (16) ( 3 f e a h q  q)
 Bar3 => (3 p3 d3)
          => (12) (3 pitch pitch pitch d3)
          => (23) (3 c pitch pitch d3)
          => (24) (3 c d pitch d3)
          => (25) ( 3  c d e d3)
          => (15) ( 3 c d e q h h) 
4)
 A =     FH EQ AQ
 B =   CQ DH EH

5)
A B B A B A A B B A A B A B B A B A A B A B B A A B B A B A A B

6)
FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH

7)

Song

Monday, March 9, 2015

Recursive Transitional Network














































Song Generated using a die and the networks:
(1 e w) (4 f g a c h q i i) (3 c d e  q h q )( 2 a b h h) (4 c d g a h i i q ) ( 3 e d g q q h)(2 b b h h) (1 a w )

EW FH GQ AI CI CQ DH EQ AH BH CH DI GI AQ EQ DQ GH BH BH AW



Wednesday, March 4, 2015

Context Free Grammar Assignment 2

Production rules:
1)      Expression -> Symbol
2)      Symbol -> { Star } | [ Star ] | ( Star )
3)      Star -> “void”
4)      Star -> *
5)      Star -> * Star
6)      Star -> Symbol Star

Terminals: * [] {} () “void”
NonTerminals: Expression Symbol Star
Start Symbol: Expression
Test 1:
{[**][](***)}
Expression=>1 Symbol
                =>2 { Star }
                =>6 { Symbol Star}
                =>2 { [ Star ] Star}
                =>5 { [ * Star] Star}
                =>4 { [ * *] Star}
                =>6 { [ * *] Symbol Star}
                =>2 { [ * *] [Star] Star}
                =>3 { [ * *] [] Star}
                =>6 { [ * *] [] Symbol Star}
                =>2 { [ * *][] (Star) Star}
                =>5 {{**}[] (* Star) Star}
                =>5 {{**}[] (* * Star) Star}
                =>5 {{**}[] (* * * Star) Star}
                =>4 {{**}[] (* * * *) Star}

                =>3{{**}[] (* * * *) }
Test 2:
{}
Expression =>1 Symbol
                  =>2 { Star }
                  =>3 {}
Test 3:
[ (*) *]
Expression =>1 Symbol
                   =>2 [ Star]
                   =>6 [ Symbol Star ]
                   =>2 [ ( Star) Star]
                   =>4 [(*)Star]
                   =>4 [(*)*]


PDF

Monday, March 2, 2015

Context Free Grammar Assignment

In this assignment I was supposed to produce a melody using a context free grammar. Based in the grammar and using a generator of random numbers( to choose the rules), I did this directly derivations : 
             Note : The number before the string is the rule number.
Melody    => (1) bar bar bar bar bar bar bar bar
                => (2) bar1 bar bar bar bar bar bar bar
                => (6) (1 p1 d1) bar bar bar bar bar bar bar
                => (10) (1 pitch d1) bar bar bar bar bar bar bar
                => (23) (1 c d1) bar bar bar bar bar bar bar
                => (14) (1 c w) bar bar bar bar bar bar bar
                => (3) (1 c w) bar2 bar bar bar bar bar bar
                => (7) (1 c w) (2 p2 d2) bar bar bar bar bar bar
                => (11) (1 c w) (2 pitch pitch d2) bar bar bar bar bar bar
                => (24) (1 c w) (2 d pitch d2) bar bar bar bar bar bar
                => (23) (1 c w) (2 d d d2) bar bar bar bar bar bar
                => (15) (1 c w) (2 d d h h) bar bar bar bar bar bar
                => (4) (1 c w) (2 d d h h) bar3 bar bar bar bar
                => (8) (1 c w) (2 d d h h) (3 p3 d3) bar bar bar bar
                => (12) (1 c w) (2 d d h h) (3 pitch pitch pitch d3 ) bar bar bar bar
                => (26) (1 c w) (2 d d h h) (3 f pitch pitch d3) bar bar bar bar
                => (25) (1 c w) (2 d d h h) (3 f e pitch d3) bar bar bar bar
                => (28) (1 c w) (2 d d h h) ( 3 f e a d3) bar bar bar bar
                => (16) (1 c w) (2 d d h h) ( 3 f e a h q  q) bar bar bar bar
                =>  (3) (1 c w) (2 d d h h) ( 3 f e a h q  q) bar2 bar bar bar
                =>  (7) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 p2 d2) bar bar bar
                =>  (11) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 pitch pitch d2) bar bar bar
                =>  (29) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 b pitch d2) bar bar bar
                =>  (28) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 b a d2) bar bar bar
                => (15) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) bar bar bar
                => (3) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) bar2 bar bar
                => (7) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 p2 d2 ) bar bar
                => (11) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 pitch pitch d2 )bar bar
                => (23) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c pitch d2 )bar bar
                => (27) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g d2 )bar bar
                => (15) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h )bar bar
                => (2) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h )bar1 bar
                => (6) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 p1 d1) bar
                => (10) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 pitch d1) bar bar
                => (25) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e d1) bar
                => (14) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) bar
                => (3) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) bar2
                => (7) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 p2 d2)
                => (11) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w)(2 pitch pitch d2)
                => (24) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d pitch d2)
                => (28) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d a d2)
                => (15) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d a h h)

 After that, I transformed the last string to a JFugue string :
Last String: (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d a h h)

Result of the combination: cw dh dh fh eq aq bh ah ch gh ew dh ah

Finally, putting this string in the SimplePlayer it produced this song file:



Wednesday, February 25, 2015

tq- C- P- A- B- @|- Problem Set

1)      Write down the axioms schema and the three shortest axioms in the tq-system
R: xT-Qx is an axiom, whenever x is a hyphen string.
    -t-q-
    --t-q--
    ---t-q---
2)      Write down the sole rule of inference for the tq-system and apply it to the well-formed string -----t-----q-----
R: Rule: Suppose that x, y and z are all hyphen-strings. And suppose that xTyQz is an old theorem. Then, xTy-qzx a new theorem.

(1) -----t-----q----- axiom
(2) -----t------q---------- from (1) using the rule
3)      Reasoning in I-mode, argue that the string you produced in the previous item is not a theorem in the tq-system
R: It cannot be a theorem because 5x6 != 11. 

4)      Working in M-mode, show that -----t ---q --------------- is a theorem in the tq-system.
R: Use the rule to go back and find the axiom, if it is an axiom, than it is a theorem.
(1)    -----t---q---------------   theorem
(2)    -----t--q---------- from (1) using the inverse of the rule
(3)    -----t-q----- from (2) using the inverse of the rule
-----t-q------ = xT-Qx
From this we ca conclude that ------t---q--------------- is a theorem in the tq-system.

5)      What are the two rules of C-system
R: 
1) Suppose x, y and z are hyphens-strings. If x-ty-qz is a theorem then Cz is a theorem.
 2) Suppose that x, y and z are all hyphen-strings. And suppose that xTyQz is an old theorem. Then, xTy-qzx a new theorem.

6)      Working within the C-system, argue that C-------- is a theorem of the system.
R: --t-q-- axiom
(2) --t--q---- from axiom using rule 2
(3) --t---q----- from (2) using rule 2
(4) --t----q-------- from (3) using rule 2
(5) C-------- from (4) using rule 1


7)      Does adding the following rule to the C-system constitute a Post production system for determining primes? Please explaining your response. Suppose x is a hyphen-string. If Cx is not a theorem, then Px is a theorem.
R: No, because the rule does not entail a purely typographical operation.

8)      Hofstadter writes. When a figure or “positive space” (e.g., human form, or a letter, or a still life) is drawn inside a frame,an unavoidable consequence is that its complementary shape – also called the “ground” , or “background”, or “negative space” – has also been drawn.  According to this view, the quiche pan shown below that I computationally rendered would be considered negative space. Explain how this is so.
R: The drawn consist in the black space and the withe space is the ground.

9)      Consider the A-system as defined by the following axiom and theorem. Axiom A-- , Rule: suppose that x is a hyphen-string, If Ax is a theorem , so is Ax--

a)      Show that A -------- is a theorem of the A-system by working within the system
R: (1) A - - axiom
     (2) A - - - - from (1) using the rule I
      (3) A - - - - - - from (2) using the rule I
      (4) A -------- from(3) using the rule I
b)      Specify a decision procedure for determining theorem hood in the A-system
R: Suppose you have Ax, if you can use the rule to go back to A -- (The only axiom) you can say that Ax is a theorem.
c)       Provide an I-mode argument that the string A------------ is not a theorem of the A-system
R: All theorems in the A-system have an even number of hyphens.
d)      What subset of the natural numbers do you think it was my intent to capture with the A-system
R: All even numbers.
      
10)   Consider the as yet to be formally defined B-system which you should imagine is intended to capture precisely all of the natural numbers that the A-system does not capture.

a)      Propose, by analogy with the rule on page 66 of GEB, an invalid rule for producing theorems in the B-system.
R: Suppose x is a hyphen-string. If Ax is not a theorem, then Bx is a theorem.
b)      Define a (valid) Post production system for the B-system in terms of one axiom and one rule
R: Axiom: B-
 Rule I: Suppose that x is a hyphen-string. If Bx is a theorem, so is Bx--
c)       Derive B----------- within the B-system.
R: (1) B- axiom
      (2) B--- from(1) using the rule I
      (3) B----- from (2) using the rule I
      (4) B------- from (3) using the rule I
      (5) B--------- from (4) using the rule I
      (6) B----------- from(5) using the rule I
d)      What subset of the natural numbers does the B-system capture?
R: All odd numbers.

11)   Under interpretation, what does the A-system theorem A -------- say? Under interpretation, what does the B-system theorem B----------- say?
R: Say that 8 is an even number and 11 is a odd number.
12)   What does mean for a set to be “recursively enumerable”? What does it mean for a set to be “recursive”?
R: Recursively Enumerable: Means that it can be generated according to typographical rules.
     Recursive: A set is recursive if you can write a program that tells you whether the given input is in the set or not.
13)   Argue that the set of even number is recursively enumerable.
R: Using the A-system you can produce every even number. The A-system use a typographical rule
14)   Argue that the set of even number is recursive
R: It is recursively enumerable and its complement (odd numbers) is recursive because you can use B-system to get all odd numbers.

15)   Argue that the set of prime numbers is recursively enumerable.
R:You could use rule of the Px-system to get all recursive enumerable.
16)   Argue that the set of prime numbers is recursive.
R: It is recursively enumerable and its complement (odd numbers) is recursive because you can use C- system to the rest of the numbers.

17)   In a sentence or two, explain why you think that I am not asking you in this problem set to derive something lime P----- within the P-system?
R: Because the P system it is not a formal system that have a typographical rule.
18)   Consider the following Post production system, a system that we will call the @?- system:
AXIOM: @ | | - ||| -
Rules: Suppose x is a string made up of zero or more symbols drawm from the set { @ , - , |} then:
1: if you have x-||-|||, you can add –
2: if you have x-|||-||, you can add –
3: if you have x|-||-||, you can add |
4: if you have x|-|||-|, you can add |
5: if you have x||-||-|, you can add |
6: if you have x|-|||-, you can add |
7: if you have x|||-||-, you can add |
8: you can replace @ by C
9: you can replace @ by G
10: you can replace @ by D
11: you can replace C| by CD
12y you can replace C- by CV
13: you can replace V| by VW
14: you can replace V- by VD
15: you can replace D| by DE
16: you can replace D- by DW
17: you can replace W| by WF
18: you can replace W- by WE
19: you can replace E| by EX
20: you can replace E- by EF
21: you can replace F| by FG
22: you can replace F- by FX
23: you can replace X| by XY
24: you can replace X- by XG
25: you can replace G| by GA
26: you can replace G- by GY
27: you can replace Y| by YZ
28: you can replace Y- by YA
29: you can replace A| by AB
30: you can replace A- by AZ
31: you can replace Z| by ZC
32: you can replace Z- by ZB
33: you can replace B| by BV
34: you can replace B- by BC

a)      How many axioms in the system? How many rules in the system? How many theorems in the system?
R:  1 Axiom. 34 Rules. Infinite theorems.
b)      Show that @||-|||-||-|||- is a theorem of the @|- system by performing a derivation within the system.
R: @||-|||-  axiom
     (2) @||-|||-| from(1) by rule 6
     (3) @||-|||-|| from(2) by rule 4
     (4) @||-|||-||- from(3) by rule 2
     (5)@||-|||-||-| from(4) by rule 7
     (6)@||-|||-||-|| from(5) by rule 5
     (7)@||-|||-||-||| from(6) by rule 3
     (8) @||-|||-||-|||- from(7) by rule 1
c)       Show that CDEFGABC  is a theorem of the @|- system by performing a derivation within the system
R: (1) @||-|||-  axiom
     (2) C||-|||- from (1) by rule 8
     (3) CD|-|||- from (2) by rule 11
     (4) CDE-|||- from (3) by rule 15
     (5)CDEF|||- from (4) by rule 20
     (6)CDEFG||-from (5) by rule 21
     (7)CDEFGA|-from (6) by rule 25
     (8)CDEFGAB - from (7) by rule 29
      (9) CDEFGABC from (8) by rule 34

d)      Show that GABCDEXG  is a theorem of the @|-system by performing a derivation within the system
R: (1) @||-|||-  axiom
     (2) G||-|||- from (1) by rule 9
     (3) GA|-|||- from (2) by rule 25
     (4) GAB-|||- from (3) by rule 29
     (5)GABC|||- from (4) by rule 34
     (6)GABCD||-from (5) by rule 11
     (7)GABCDE|-from (6) by rule 15
     (8)GABCDEX - from (7) by rule 19
      (9) GABCDEXG from (8) by rule 24

e)      Show that DEXGABVD is a theorem of the @|-system by performing a derivation within the system
R: (1) @||-|||-  axiom
     (2) D||-|||- from (1) by rule 10
     (3) DE|-|||- from (2) by rule 15
     (4) DEX-|||- from (3) by rule 19
     (5)DEXG|||- from (4) by rule 24
     (6)DEXGA||-from (5) by rule 25
     (7)DEXGAB|-from (6) by rule 29
     (8)DEXGABV - from (7) by rule 33
      (9) DEXGABVD from (8) by rule 14

f)       What do you think I had in mind when I invented this system?
 R:Generate musical scales.


Click here to download the PDF