4 views

Uploaded by Mian Saeed Rafique

8986

- Show Parameters; O7 DICTIONARY ACCESSIBILITY Active Instance Count Aq Tm Processes Archive Lag Target Asm Diskgroups Asm Diskstring Asm Power Limit Audit File Dest
- Fifteen Theses on Contemporary Art and Theses on Universal
- LACL96
- Home Assignment No-3
- The AlphaGo Film Documents the Journey of a New AI Named AlphaGo
- 24422-4
- TOC-QB
- dl-logics
- Weight Age Cs gate
- Logic Sylabus
- Hors Pool
- A Program Asking the User to Unscramble the Scrambled Word
- K-Map Teknik Digital
- hw2-solutions.pdf
- EC304
- Dbscan Algorithm
- Dcs
- GTKeC.doc
- Introduction to Prolog
- msem-2011

You are on page 1of 36

Theory of Computation

1/1

Presburger arithmetic

Decidability of Presburger Arithmetic

Theory of Computation

2/1

Theory of Computation

Dr. Sarmad Abbasi

Theory of Computation

3/1

Logical Theories

{, , , (, ), , , x, R1 , R2 , . . . , Rk }

We considered formulas with this alphabet. Some examples of formulas

1

x1 x2 R1 (x1 , x2 ) R2 (x1 , x3 )

2

Theory of Computation

4/1

Logical Theories

1

x1 x2 R1 (x1 , x2 ) R2 (x2 , x1 )

2

xR1 (x, x)

This defines the syntax.

Theory of Computation

5/1

Logical Theories

1

Theory of Computation

6/1

Logical Theories

The language of a model M is the set of all formulas which use the

relation symbols with correct airy

Suppose in the model M

1

Theory of Computation

7/1

Logical Theories

The formula

x1 x2 (R1 (x1 , x2 ) R2 (x4 )) (R3 (x2 , x1 , x3 , x4 , x5 )

is in the language. Since, all relations have the right airty but

x1 x2 (R1 (x1 ) R2 (x4 )) (R3 (x2 , x1 )

is not since the airty of two relations is wrong.

Theory of Computation

8/1

Logical Theories

definition the set of all sentences that are true sentences in the language

of that M.

A central point of investigation is to find out which theories are decidable

and which ones are not.

Theory of Computation

9/1

Logical Theories

Note that when we are talking about a model in which relations have some

usual meaning then we shift to infix notation. We also saw examples of

sentences that are true in one model and false in another model.

Theory of Computation

10 / 1

Logical Theories

Let us look at one:

= y x[R1 (x, x, y )]

1

The sentence can be rewritten as

= y x[x + x = y ]

and it is not true.

PLUS. The sentence can be rewritten as

= y x[x + x = y ]

and it is true.

Dr. Sarmad Abbasi ()

Theory of Computation

11 / 1

Logical Theories

Given a Model M we would like to know which sentences are true and

which ones are not true.

What we want is a decision procedure or an algorithm which will take a

sentence and tell us if the sentence is true or not.

Theory of Computation

12 / 1

Logical Theories

relation + and , =, with their usual meaning.

This theory is undecidable. This is a major theorem by Alonzo Church

building on the work of Godel.

Theory of Computation

13 / 1

Logical Theories

Arithmetic.

1

Theory of Computation

14 / 1

Logical Theories

1

y x[x + x = y ]

cannot write xy or x 2 . So in this theory the variables are only multiplied

by constants. We cannot use higher powers either.

Theory of Computation

15 / 1

Logical Theories

algorithm (or a TM) with will take as input a sentence and decide if it is

true or not. How does the input look like:

1

y zx[(x + x = y ) (y + x = z)]

xy z[(z + x = z + y ) (y + x = z + z])]

Theory of Computation

16 / 1

Logical Theories

Lets start with something simpler. Let us look at the simple atomic

formula

x +y =z

Can we design a DFA that accepts x, y , z if and only if they satisfy this

equation?

Theory of Computation

17 / 1

Logical Theories

Let us be more clear. How will the input be given to the DFA. Let us define

0

0

0

1

1

1

1

0

0 , 0

1 , 1 , 0 , 0 , 1 , 1

3 =

0

1

0

1

0

1

0

1

Theory of Computation

18 / 1

Logical Theories

input to the DFA would be

1

0

1

0 1 1

1

1

0

1

Theory of Computation

19 / 1

Logical Theories

string I 3 such that the top row of the string when added to the

second row of the string gives us the last row of the string?

Theory of Computation

20 / 1

Logical Theories

The answer is yes. But it is easier if the machine is given the strings in

reverse. Lets see how do we add in binary:

010100

001111

The way we add is we remember the carry and compute the next digit and

keep moving left. If the numbers were given to us in reverse we will

remember the carry and keep moving right. So, if these numbers were

given to us in reverse.

Theory of Computation

21 / 1

Logical Theories

c =0

0 0 1 0 1 0

1 1 1 1 0 0

1

c =0

0 0 1 0 1 0

1 1 1 1 0 0

1 1

c =0

0 0 1 0 1 0

1 1 1 1 0 0

1 1 0

Theory of Computation

22 / 1

Logical Theories

c =1

0 0 1 0 1 0

1 1 1 1 0 0

1 1 0 0

c =1

0 0 1 0 1 0

1 1 1 1 0 0

1 1 0 0 0

c =1

0 0 1 0 1 0

1 1 1 1 0 0

1 1 0 0 0 1

Theory of Computation

23 / 1

Logical Theories

If the answer were given to us. We could check it as we go along. Actually

this DFA is very very simple. Let us look at it. It has only two state and a

trap state.

q0 , q1 and qr . q0 is the accept state. Here are the transitions. When the

machine is in q0 the carry is 0. When it is in q1 the carry is 1.

1

0

(q0 , 0 ) = q0

0

2

0

(q0 , 0 ) = qr

1

Theory of Computation

24 / 1

Logical Theories

1

0

(q0 , 1 ) = qr

0

2

0

(q0 , 1 ) = q0

1

3

1

(q0 , 1 ) = q1

0

Theory of Computation

25 / 1

Logical Theories

The top row of I read revered in binary + Second row of I read reversed in

binary = Last row of I read reverse in binary

Thus if I represents three numbers x, y and z then the DFA accepts if and

only if

x + y = z.

Theory of Computation

26 / 1

Logical Theories

What about other equations in Presburger Arithmetic. Let us think about

x +y =z +z +t

We can use the same trick.

Let

0

0

,

4 =

,

1

binary. We can make a DFA D such that D accepts I if and only if

x +y =z +z +t

.

Dr. Sarmad Abbasi ()

Theory of Computation

27 / 1

Logical Theories

x1 , . . . , xi

variables we define

i

to be an alphabet with 2i characters. Each string S i defines i

numbers a1 , . . . , ai . We can make a DFA D such that

D accepts S if and only if a1 , . . . , ai satisfy the equation F .

Theory of Computation

28 / 1

Logical Theories

x 1 + x 2 + x2 + x2 = x3 + x3 + x4 + x5 .

x 1 + x2 + x3 + x5 = x4 + x4 + x4

We can make DFA D1 such which accepts strings over 5 in the first case

and another DFA D2 which accepts strings over 5 . So, in some sense

DFAs can capture atomic formulas of Presburger Arithmetic.

What about non atomic formulas?

Theory of Computation

29 / 1

Logical Theories

What about non atomic formulas?

(x1 + x2 + x2 + x2 = x3 + x3 + x4 + x5 ) (x1 + x2 + x3 + x5 = x4 + x4 + x4 )

(x1 + x2 + x2 + x2 = x3 + x3 + x4 + x5 ) (x1 + x2 + x3 + x5 = x4 + x4 + x4 )

(x1 + x2 + x2 + x2 = x3 + x3 + x4 + x5 ) (x1 + x2 + x3 + x5 = x4 + x4 + x4 )

In the first case we can make a DFA that accepts all the strings accepted

by D1 or D2 . Regular languages are closed under union, intersection and

complementarily.

Dr. Sarmad Abbasi ()

Theory of Computation

30 / 1

Logical Theories

x1 , . . . , xi

variables we define

i

to be an alphabet with 2i characters. Each string S i defines i

numbers a1 , . . . , ai . We can make a DFA D such that

D accepts S if and only if a1 , . . . , ai satisfy F .

Theory of Computation

31 / 1

Logical Theories

What about formulas with quantifiers lets look at one of them:

x3 [x1 + x2 + x2 = x3 ]

.

This formula has two free variables

x 1 , x2

So lets work with 2 and 3 . We can make a DFA D that accepts strings

S 3 such that S represents x1 , x2 and x3 which satisfy

x1 + x2 + x2 = x3

.

We would like a DFA D 0 that accepts strings S 0 2 such that S 0

represent x1 , x2 and satisfy

x3 [x1 + x2 + x2 = x3 ]

.

Dr. Sarmad Abbasi ()

Theory of Computation

32 / 1

Logical Theories

It is much easier to make an NFA given the DFA D. The NFA N simply

guesses the value of x3 as it goes along moving to the right. Thus in each

move it makes two non-deterministic moves. One pretending the current

bit of x3 is 0 and the other pretending that it is 1. We can then convert

this NFA N to a DFA using a standard algorithm.

Theory of Computation

33 / 1

Logical Theories

We can deal with quantifiers like this one by one. Let say we have a

formula

= xi

First we make an DFA D that accepts those over i that represent

x1 , . . . , xi and satisfy . Then we make an NFA that uses D and guesses

the value of each bit of xi as it goes along. We convert this D to D 0 which

now accepts strings over

i1

.

Theory of Computation

34 / 1

Logical Theories

How to handle

= xi

This is easy since

xi =

First we make an DFA D that accepts those over i that represent

x1 , . . . , xi and satisfy .

Thus we can use the fact that regular languages are closed under

complementarily to make a DFA D that accepts . We also use the

technique for handling .

Theory of Computation

35 / 1

Logical Theories

Q 1 x1 Q2 x 2 x i

We can make a DFA D that will accept the empty string over 0 if and

only if the formula is true. In the end we run D on the empty string to see

if accepts . If it does then the formula is true. Otherwise it is false.

Theory of Computation

36 / 1

- Show Parameters; O7 DICTIONARY ACCESSIBILITY Active Instance Count Aq Tm Processes Archive Lag Target Asm Diskgroups Asm Diskstring Asm Power Limit Audit File DestUploaded bypopo777
- Fifteen Theses on Contemporary Art and Theses on UniversalUploaded byhd9j3hir0j3
- LACL96Uploaded byShubham Goel
- Home Assignment No-3Uploaded byAmbreen Asif
- The AlphaGo Film Documents the Journey of a New AI Named AlphaGoUploaded byZidane Smith
- 24422-4Uploaded bybhaskarlxm
- TOC-QBUploaded byJaison Babu
- dl-logicsUploaded byĐang Muốn Chết
- Weight Age Cs gateUploaded bysjo05
- Logic SylabusUploaded bySunil Duran
- Hors PoolUploaded byroyalsoft
- A Program Asking the User to Unscramble the Scrambled WordUploaded byPooja Kapoor
- K-Map Teknik DigitalUploaded byOkkyAdhitya
- hw2-solutions.pdfUploaded byKarthikBalasubramanian
- EC304Uploaded byapi-3853441
- Dbscan AlgorithmUploaded byhites34
- DcsUploaded byHimank Rao
- GTKeC.docUploaded byWilson Nishimori
- Introduction to PrologUploaded byWan Hussain Wan Ishak
- msem-2011Uploaded byMani Kandan
- Comparative Report on Programming Languages 2Uploaded byGilzpo
- LE1 Sample Exam 2Uploaded byKiana Marie Sy
- The Karmarkar RevolutionUploaded byDominic
- Involutive Divisions and Monomial Orderings IUploaded byAnonymous Tph9x741
- ch2_tutorial1Uploaded byNurul Haj Hamsir
- Explicit o 070Uploaded bymutucaum
- Summation OperatorsUploaded byAnh Viet Vu
- DiameterUploaded byRavinder Singh
- Phoebe Gay pUploaded byLights Zub
- nine_18936.pdfUploaded byRam Bhagat Soni

- Lecture 19Uploaded byMian Saeed Rafique
- Mrk_Spring 2013_CS619_516_1736_S13025FFE9Uploaded byMian Saeed Rafique
- Fall 2012_CS614_1_MC110400801Uploaded byMian Saeed Rafique
- Spring 2012_CS614_1Uploaded byMian Saeed Rafique
- Lecture 32Uploaded byMian Saeed Rafique
- Lecture 28Uploaded byMian Saeed Rafique
- Lecture 20Uploaded byMian Saeed Rafique
- Lecture 15Uploaded byMian Saeed Rafique
- Lecture 10Uploaded byMian Saeed Rafique
- Lecture 11Multi Version Timestamp Ordering ProtocolUploaded bySun Java
- Lecture 12Uploaded byMian Saeed Rafique
- Lecture 42Uploaded byMian Saeed Rafique
- Lecture 43Uploaded byMian Saeed Rafique
- Lecture 44Uploaded byMian Saeed Rafique
- Lecture 45Uploaded byMian Saeed Rafique
- LecMulti Version Timestamp Ordering Protocolture 05Uploaded bySun Java
- ion Timestamp Ordering Protocol03Uploaded bySun Java
- Lecture 02Uploaded byMian Saeed Rafique
- Lecture 01Uploaded byMian Saeed Rafique
- Assignment No. 03 MS150200090Uploaded byMian Saeed Rafique
- CS 701 Research Paper (MS150200090)Uploaded byMian Saeed Rafique
- CS 701Uploaded byMian Saeed Rafique
- Fall 2012_CS614_1Uploaded byMian Saeed Rafique
- Fall 2012_CS501_1_MC110400801Uploaded byMian Saeed Rafique
- Fall 2012_CS501_1Uploaded byMian Saeed Rafique
- satyanarayanan01pervasiveUploaded byDennis Ebenezer Dhanaraj
- Turing Slides 1Uploaded byMian Saeed Rafique
- CSUploaded byMian Saeed Rafique
- Instruction PipeliningUploaded byMian Saeed Rafique

- 06.Development of Acute Megakaryoblastic Leukemia in Down Syndrome is Associated With Sequential Epigenetic ChangesUploaded byCristi Daniel Neagoe
- Effect UationUploaded byAnonymous RvXrU86Z2Z
- toxoplasmoza_Final(1)_14.09.2014Uploaded byElena Elenaa
- letterofreckristiUploaded byapi-255083304
- 2013 High-Intensity Interval Training, Solutions to the Programming Puzzle.pdfUploaded byIvan Cuyul
- Journal OrtoUploaded byCesar Augusto Rojas Machuca
- Bbp June08 OtolUploaded bymofiw
- 6SCM_Lecture6S.pdfUploaded bySwaraj Dhar
- Taran Swan Case AnalysisUploaded byLuis Angel Quispe Peña
- AspectsUploaded bySrinivas Sukhavasi
- Nested Radicals and Other Infinitely Recursive ExpressionsUploaded byapi-26401608
- Ponce (2) FOIA 12-015[1]Uploaded byThe Virginian-Pilot
- Market FailureUploaded byShevon Williams
- A Study on Green Packaging Design in TaiwanUploaded byAninditya Wisnuputri
- mmUploaded byswayam
- Presentation Don't Look Back-Salem MaamriUploaded byChéTunisia
- Tutorial 1Uploaded byTai Yuan Ching
- MajapahitUploaded byMalvin Juan Sebastian
- Linear Technology-Understanding IP2 and IP3 Issues in Direct Conversion Receivers for WCDMA Wide Area BasestationsUploaded byMichael Graham
- Chapter IV (1)Uploaded byEka Yanita
- The New Cosmos. An Introduction to Astronomy and AstrophysicsUploaded bySimon_98
- B2 Electronic Fundamentals SyllabusUploaded byMohammad Faraz Akhter
- Analytical Exposition TeksUploaded byKelvin
- Ram Charit Manas Bal Kand 0199-0264Uploaded byapi-3824888
- avantUploaded bytonywai
- Fuzzy Logic Based Image Edge Detection Algorithm in MatlabUploaded bySurpiling Horeus
- Revised Financial Statement for March 31, 2016 [Company Update]Uploaded byShyam Sunder
- Up the Down StaircaseUploaded byAna_Koridze_243
- Digital Citizenship SyllabusUploaded byjanetleahr
- Western Ukraine Within Poland 1920-1939Uploaded byandriy112