Highlights
1 Operation on very large numbers
You are given the task of performing some mathematical operations on very large numbers. However, you and that the numbers are given are too large to be stored in variables like int (which has a limitation of max 1073741823). You then have a brilliant idea and decide to store these numbers in the form of base 10 lists of digits.
e-lists are implemented in such a way that the least signi?cant digit occupies the ?rst position in the list and the most signi?cant digit occupies the last digit.
So as an example, the number 123 would be represented as [3, 2, 1] in the list format and 912 would be [2, 1, 9]. On adding these two we should get [5, 3, 0, 1] which is 1035.
1. De?ne an algorithm for the following operations on large numbers: (a) Convert a given integer number into the list format.
(b) Convert a number in list format into its equivalent integer. (If the number in list format exceeds 109, then the function should just return 109).
(c) Add two numbers in list format.
(d) Compare two numbers in list format. ?e algorithm should return True if ????1 ≤ ????2 and False otherwise.
2. Prove the correctness of your algorithms and analyze their time and space complexities.
3. Implement the four algorithms as four functions:
(a) LgintToInt : int list → int
(b) intToLgint : int → int list
(c) addLgint : int list ∗ int list → int list
(d) LgLesseq : int list ∗ int list → bool
Bonus: Design an algorithm for multiplication of two numbers in list format and implement your algorithm in the form of a function multiplying: int list ∗ int list.
2 arterly Performance
You are given a list of tuples of employees in a start-up, where each tuple contains an employee’s performance points for each quarter in the last year and their current salary (???????????????????????? = 100 ∗ ???? for some ???? ∈ N).
You are expected to ?nd the average performance of each quarter for all the employees and if an employee’s performance is above the average performance of that quarter provide them with a salary hike of 1% increment on base salary when at least 10% gain compared to average and in increments of 1% for every additional 10% di?erence between their points and average. For example, if their points are 42 and if the average for that quarter is
• >= 38.2, they get no hike from that quarter
• = 36, they get 1% hike
• = 30, they get 4% hike
e total salary hike for an employee will be done accordingly using all quarters and output the resultant salaries of all the employees.
For example, if the input is [(10, 20, 30, 40, 100000), (30, 30, 20, 50, 150000), (60, 10, 10, 50, 200000)], the output would be [105000, 157500, 216000]. Finally, calculate the overall percentage raise in salary budget the start-up has to handle solely considering salary hike. which would be 0.0633… for the above example
1. Design an algorithm to apply the above logic on a list of employees and argue its correctness. You should use higher-order list functions like map, ?lter and foldl/r as to the extent possible.
2. Analyse the time and space complexity of your algorithm.
3. Implement your algorithm containing functions performance : (int ∗ int ∗ int ∗ int) list → int list and budget rise : (int ∗ int ∗ int ∗ int ∗ int) list → real.
3 Lexicographic Permutations
Lexicographic ordering is what you may have already noticed in the ordering of words according to the alphabet in the dictionary.
More formally, Given two lists [????1, ????1] and [????2, ????2], they are said to be [????1, ????????] < [????2, ????2] in a lexicographical order i? either ????1 < ????2 or ????1 = ????2 and ????1 < ????2. ?is can be extended to lists of characters of arbitrary length by recursively applying this de?nition.
For example, [????, ????, ????] < [????, ????, ????] < [????, ????, ????] if we are to take the English alphabet order for the lists of characters. For example for
1. Design an algorithm which enumerates all permutations of the given list of distinct characters in lexicographic order and prove its correctness. For example for input [a,b,c] the output will be [[a,b,c],[a,c,b],[b,a,c],[b,c,a],[c,a,b],[c,b,a]].
2. Analyze the time and space complexities of your algorithm.
3. Implement your algorithm as a function lexicographicPerm :0a list → 0a list list
Bonus: Implement a new function lexicographicPermDup:0a list → 0a list to handle the input containing duplicate characters. ?e output list should have no duplicate permutations.
This COL100 - IT Assignment has been solved by our IT 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 distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.