001_CS536_Baddam_Krishna_assigmnent_3

001_CS536_Baddam_Krishna_assigmnent_3 - CS-536 Assignment-3...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS-536 Assignment-3 CWID # A201930231A.a.{ab= xy*z} (y,z :=y-1,x*z) { ab= xy*z}{ab= xy*z} => ab= xy*z x*zz y-1y=> ab= xy-1*x*z=> ab= xy*z{ab= xy*z} => ab= xy*zTrue => TrueHence, the statement is correct.b.{ab= xy*z ^even(y) ^y != 0 } (x,y := x*x,y/2) { ab= xy*z}{ab= xy*z ^even(y) ^y != 0 } => ab= xy*z yy/2xx*x=> ab= (x*x)y/2*z => ab= (x2)y/2*z=> ab= xy*z{ab= xy*z ^even(y) ^y != 0 } => ab= xy*zHence, {ab= xy*z ^even(y) ^y != 0 } is a subset of ab= xy*z and it is correct.2A.a. { z* xy= ab^ y ≠ 0 }if odd(y) then (y,z) := (y-1, z*x);else (x,y):= (x*x, y/2); { z* xy= ab}{ z* xy= ab^ y ≠ 0 ^ odd(y)} (y,z) : = (y-1, z*x) { z* xy= ab} and{ z* xy= ab^ y ≠ 0 ^ even(y)} (x,y):= (x*x, y/2) { z* xy= ab}Let us take first { z* xy= ab^ y ≠ 0 ^ odd(y)} (y,z) : = (y-1, z*x) { z* xy= ab}{ z* xy= ab^ y ≠ 0 ^ odd(y)} => z* xy= abzz*xyy-1=> z*x* xy-1= ab=> z* xy= ab{ z* xy= ab^ y ≠ 0 ^ odd(y)} => z* xy= aband{ z* xy= ab^ y ≠ 0 ^ even(y)} (x,y):= (x*x, y/2) { z* xy= ab}{ z* xy= ab^ y ≠ 0 ^ even(y)} => z* xy= ab yy/2xx*x => z* (x*x)y/2= ab=> z* (x2)y/2= ab=> z* xy= ab{ z* xy= ab^ y ≠ 0 ^ even(y)} =>z* xy= abTrue and True is True....
View Full Document

This note was uploaded on 05/04/2011 for the course CS 536 taught by Professor Cs536 during the Spring '08 term at Illinois Tech.

Page1 / 7

001_CS536_Baddam_Krishna_assigmnent_3 - CS-536 Assignment-3...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online