Highlights
1. Using the fact that the HALTING Problem is undecidable, (that is no terminating algorithm exists for it) show that the following problem is also undecidable: The Acceptance Problem: Consider the set of all programs that take an integer written in binary format and either returns “Accept” or “Reject” or runs for ever. Can we write a program called ACCEPTANCE which takes such a program P (written in any language, say C or Python) and decides whether P accepts all integers or not? So we can imagine many such programs: one that decides if the input integer is even, another that decides if the input integer is a prime number, another that decides if the input integer is a powe of 2, etc. There are infinitely many such programs that we can think of. The question we wish to decide is that can we look at the text of a program and decide if it accepts all integers or not. You are to show that this problem, like the HALTING Problem is undecidable. (You may either prove this directly, or use the fact that the HALTING Problem is undecidable and try to “reduce” it to this problem.)
2. For the insertion sort algorithm we are implicitly using a subroutine that works as follows: Given a list L that is already sorted in increasing order, and a new number a, it will insert it into L maintaining the sorted property of L.
2a) You are to write an algorithm for the insertion problem. Given a sorted list of numbers L and a new number a, express your algorithm “RECINSERT(L,a)” recursively. You should not use any for, while etc. loops. Only recursive calls and if, if ... else statements, arithmetic operations, assignments, and comparisons may be used.
2b) Let the time complexity of your algorithms, that is the number of comparisons and basic operations (assignment, arithmetic operations, etc.) in your algorithm be f(n) where n is the length of L. Find a recurrence relation for f(n), and also state what f(1) equals to.
2c) Solve the recurrence you derived and find the asymptotic running time of our algorithm using the O(·) notation.
This Computer Science Assignment has been solved by our Computer Science experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinctio.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.