Assessed Coursework

Course Name Algorithmic Foundations 2

Coursework Number 1

Deadline Time: 16:30 Date: 26/10/2020

% Contribution to final course mark 10%

Solo or Group 9 Solo 9 Group

Anticipated Hours

Submission Instructions 10

Use the latex template and submit the generated pdf through moodle (do not submit the source latex file). Failure to follow the submission instructions will lead to a penalty of 2 bands.

Please Note: This Coursework cannot be Re-Assessed

Code of Assessment Rules for Coursework Submission

Deadlines for the submission of coursework which is to be formally assessed will be published in course documentation, and work which is submitted later than the deadline will be subject to penalty as set out below.

The primary grade and secondary band awarded for coursework which is submitted after the published deadline will be calculated as follows:

(i)in respect of work submitted not more than five working days after the deadline

a.the work will be assessed in the usual way;

b.the primary grade and secondary band so determined will then be reduced by two secondary bands for each working day (or part of a working day) the work was submitted late.

(ii)work submitted more than five working days after the deadline will be awarded Grade H.

Penalties for late submission of coursework will not be imposed if good cause is established for the late submission. You should submit documents supporting good cause via MyCampus.

Penalty for non-adherence to Submission Instructions is 2 bands

Yo m comple e an On Work form ia https://studentltc.dcs.gla.ac.uk/ for all coursework

Algorithmic Foundations 2

Assessed Exercise 1

Notes for guidance

1.There are two assessed exercises. Each is worth 10% of your final grade for thismodule. Your answers must be the result of your own individual e?orts.

(a) ?(p _ (q ^?r)) ^ q ? (?p ^ q) ^ r[4]

(b) (p ! r) _ (q ! r) ? (p ^ q) ! r[4]

(c) 8x 2 U. (P(x) !?Q(x)) ??9x 2 U.(P(x) ^ Q(x))[2]

2.Please use the latex template and submit your the generated pdf via moodle (do notsubmit the latex source file).

3.Please ensure you have filled out your tutorial group, name and student id.

4.Failure to follow the submission instructions will lead to a penalty for non-adherence to submission instructions of 2 bands.

5.As stated on the cover sheet deadline for completing this assessed exercise is 16:30 Monday, October 26, 2020.

6.The exercise is marked out of 30 using the included marking scheme. Credit will begiven for partial answers.

1.Using the laws of logical equivalence show:

AF2 - Assessed Exercise 12

2.Assuming the following predicates:

?L(x,y): x is strictly less than y (x<y);

?E(x): x is even;

?P(x): x is a prime number;

?EQ(x,y): x equals y (x=y);

?G(x): x is greater than zero (x>0);

?D(x,y): x divides y exactly;

determine which of the following formulae are true (in your answer include an expression of the formula in concise (good) English without variables).

(a) 8x 2N.(D(2,x) ! E(x))[2]

(b) 9y 2N.8x 2N.L(x,y)[2]

(c) 9x 2Z+.8y 2Z+.(G(x) ! (P(y) ^ L(x,y)))

Next, using the above predicates and quantifiers were necessary, express the following English statements in logic.[2]

(d) “Any non-zero integer divides itself”[2]

(e) “A prime number’s only positive factors are 1 and itself.” 3. Prove that (B\A) [ (C\A) = (B [ C)\A using:[2]

(a) a containment proof.[3]

(b) using set builder notation and logical equivalences.

4. For each of the following functions find the inverse or explain why no inverse exists.[3]

(a) f : N!N where f(x) = 4·x2 + 1[2]

(b) g : Z!Z where g(x) = x + 7[2]

版权所有：留学生编程辅导网 2018 All Rights Reserved 联系方式：QQ:99515681 电子信箱：99515681@qq.com

免责声明：本站部分内容从网络整理而来，只供参考！如有版权问题可联系本站删除。