Federation UNIVERSITY AUSTRALIA ITECH1400 Fundamentals of Programming ASSIGNMENT 1 - THUE-MORSE SEQUENCES Overview In th

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Federation UNIVERSITY AUSTRALIA ITECH1400 Fundamentals of Programming ASSIGNMENT 1 - THUE-MORSE SEQUENCES Overview In th

Post by answerhappygod »

Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 1
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 1 (74.26 KiB) Viewed 36 times
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 2
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 2 (81.62 KiB) Viewed 36 times
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 3
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 3 (87.74 KiB) Viewed 36 times
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 4
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 4 (65.56 KiB) Viewed 36 times
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 5
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 5 (55.28 KiB) Viewed 36 times
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 6
Federation University Australia Itech1400 Fundamentals Of Programming Assignment 1 Thue Morse Sequences Overview In Th 6 (55.28 KiB) Viewed 36 times
Federation UNIVERSITY AUSTRALIA ITECH1400 Fundamentals of Programming ASSIGNMENT 1 - THUE-MORSE SEQUENCES Overview In this assignment you will have the opportunity to test your Python skills in generating and manipulating text. Throughout the assignment you are expected to apply the principles of problem solving that we have already discussed in this course. Timelines and Expectations Percentage Value of Task: 20% Due: Fri, May 6,2022 17:00 (Week 7) Minimum time expectation: 20 hours Learning Outcomes Assessed The following course learning outcomes are assessed by completing this assessment: Knowledge: Kl. Identify and use the correct syntax of a common programming language. K2. Recall and use typical programming constructs to design and implement simple software solutions. K4. Explain the importance of programming style concepts (documentation, mnemonic names, indentation). Skills: sl. Utilise pseudocode and/or algorithms as a major program design technique. $2. Write and implement a solution algorithm using basic programming constructs. $4. Describe program functionality based on analysis of given program code. Application of knowledge and skills: A1. Develop self-reliance and judgement in adapting algorithms to diverse contexts. A2. Design and write program solutions to identified problems using accepted design constructs.
UNIVERSITY AUSTRALIA ASSESSMENT DETAILS 0. Introduction. The Thue-Morse sequence is an infinite word in the alphabet of two symbols, '0' and '1', which can be constructed in the following way: (0) to='0' (1) ti= '0' + '1' = '¹01' (2) ta= '01' + '10' = '0110' (3) to='0110' + '1001'¹01101001' ... (n) ta=ta-1 + 1, where -1 denotes the 'inverse' of ta-1, i.e. all '0's in ta-1 are replaced by '1's and vice versa. ... It is easy to see that each t₁ is the first half of t, and t can be seen as an extension of ti. This sequence of extensions can be performed infinitely many times, thus building an infinite word, T, which contains all tis as its prefixes (beginnings): T= '0110100110010110100101100110100110010110011010010.... T has an important property: it does not contain "cubes", i.e. three consecutive identical blocks (sub-words). Thue-Morse sequence has multiple applications ranging from Chess to Group Theory and Differential Geometry. Task 1. Building Thue-Morse sequence. In this task you are required to write a Python function named thue morse(n). that takes a positive integer parameter, n, and returns the string ta (defined above). In your program you may define other (auxiliary) functions with arbitrary names, however, the solution function of this task should be named thue_morse (n). [5 marks]
Task 2. Building a square-free word in the alphabet of three symbols. In this task you are required to write a function in Python that builds an arbitrarily long (potentially infinite) square-free word in the alphabet of three symbols, '1', '2', '3'. I.e. a word that does not contain "squares" two consecutive identical - sub-words. Although, this can be done by using the Thue-Morse sequence, in this task we will use another construction, suggested by S. Arshon. 2.1. Construction of the Square-Free Word: Again, as in Task 1, we will build a sequence of finite words, a, that can be extended to an infinite word. We start with a '1'. Each next word, a, is constructed by replacing each occurrence of the symbols '1', '2', '3' in the previous word, ax, with 3- letter words according to the following rules: (1) if symbol '1' is in an odd position in ax, then it is replaced with the word '123', if '1' is in even position, it is replaced with '321'. (2) if symbol '2' is replaced with the word replaced with '132'. in an odd position in a then it is '231', if '2' is in even position, it is (3) if symbol '3' is in an odd position in ax, then it is replaced with the word '312', if '3' is in even position, it is replaced with ¹213'. Here's the table repeating the replacement rules in a tabular format: Symbols in odd positions Replacement string for odd positions 123 Symbols in even positions Replacement string for even positions 321 1 1 2 231 2 132 3 312 3 213 Please note, that in this description the first symbol is considered to be in position 1. Therefore, you will need to make
Federation UNIVERSITY AUSTRALIA the necessary adjustments when using Python strings, which are zero-based. Below you can see the first few steps of the construction process: 80= '1' 81= '123' 8¹123132312" = '123132312321312132312321231' ... A = '1231323123213121323123212312132313213123212313213121323...' 2.2. The Programming Tasks. (a) You are required to write a Python function named square_free (n), that takes a positive integer parameter n and returns the string an (defined above). Again, as in Task 1, you may define other (auxiliary) functions with arbitrary names, however, the solution function of this task should be named square_free (n). [9 marks] (b) Write a Python function named print3Blocks (s) that takes a string, s, as a parameter and prints it in blocks of 3 symbols separated by white spaces. For example, print3Blocks (a) will print: 123 132 312 321 312 132 312 321 231 [1 mark] Task 3. Counting the number of squares in a string. In this task you are required to write a Python function named count_squares (s) that takes a string, s, as a parameter and returns the number of "squares" in s, i.e. the number of occurrences of two consecutive identical sub-words in s. For example, count_squares ('1231233') should return 2 as there are two "squares" in its argument: 1231233' and '1231233. [5 marks]
Tasks Marks deducted for badly commented or badly written code Task 1. thue_morse function . Algorithm in pseudo-code . Python code • Demonstration that code works correctly using representative samples. 1 Task 2. square free function Algorithm in pseudo-code • Python code • Demonstration that code works correctly using representative samples Task 2. print3Blocks function Python code . Task 3. count_squares function • Algorithm in pseudo-code Python code . Demonstration that code works correctly using representative samples Omegle Total Weight Awarded (-4) 1 20+ (-4)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply