Решить 3 задания Algorithms and Data Structures
18 USDProblem 1
Consider the operations Union and Find from the Union-Find algorithm with path compression.
Suppose we have a set of n elements, which has had a series of arbitrary Unions performed on
it. Let us denote the result as T. Determine the complexity (expressed in terms of n and m) of a
sequence of m Find operations performed on T.
your upper bound should be tight, and the analysis must be done using either the
accounting method (credits) or the potential method.
Problem 2
Suppose we need a data structure in which we can search for elements. Specifically, we need to be
able to perform operations:
Insert(A; x) adds an element x to the structure A;
Check(A; x) determines whether a given element x is in the structure A.
One way to do this is to keep an array of elements in sorted order. Constant time access allows us
to quickly search for elements using a binary search in O(log n) time. On the other side, inserting
elements is slow (O(n)) due to the requirement that the array remains sorted: when we add an
element, all the elements after it must be shifted one array index to the right.
Let us examine a better data structure that provides the same functionality: Keep a list of arrays,
numbered 0 through n, where array k is of size 2k. We will maintain the invariant that all arrays
are either empty or full, and all full arrays are sorted. To insert an element, we rst create an
array of size 1 containing only that element. Then we iterate through the list of arrays, starting
with the smallest. If the current array k is empty, we replace it with the full new array and we
are done. Otherwise, we merge array k into the new array using the standard operation Merge,
doubling its size. Then we set array k to be empty and move on to array k + 1.
Compare the time complexity of the operations Insert and Check over an ordered array data
structure and over an array of ordered arrays data structure. What is the worst case complexity
of the operation Insert into a ListOfArrays containing n elements? What is the worst case
complexity of a sequence containing m Search and n Insert operations performed on an initially
empty data structure?
your upper bound should be tight, and the analysis must be done using either the
accounting method (credits) or the potential method.
Problem 3
The element of rank i in an array A[1; : : : ; n] of numbers is the i-th smallest element of A.
Design an algorithm that takes as an input an array A[1; : : : ; n] of numbers, a positive integer
b, and a non-negative integer k such that kb≤n. The algorithm should print the elements of A
whose ranks in A are b; 2b; 3b; :::; kb (in order). If k = 0, your algorithm should print nothing. Your
algorithm should run in O(n log k) time. For simplicity, you can assume that all the elements in
A are distinct. Prove that your algorithm has the required complexity.
Больше информации в прикрепленных файлах.
По цене рассмотрю Ваше предложение.
Applications 1
Current freelance projects in the category AI & Machine Learning
Marketing automation through AII'm looking for a person (not a bot) who understands AI agents and knows how to build them. By AI agent, I mean: processing input data, making a request to a 1x LLM or similar AI model, potentially requesting MCP or similar, potentially requesting a RAG system, processing output… AI & Machine Learning ∙ 1 hour 18 minutes back ∙ 14 proposals |
Creation of AI AgentAn AI agent is required to perform the functions of a professional packaging designer for a sports nutrition brand. The agent should assist in developing new product designs, creating labels, and adapting existing layouts for various markets and requirements.Main tasks of the AI… AI & Machine Learning, AI Art ∙ 1 hour 53 minutes back ∙ 10 proposals |
"Automation / Chatbots" "CRM Setup"
113 USD
Looking for a technical assistant/integrator to set up automation in a beauty salon. Setting up a chatbot for the beauty salon (Integration of Instagram + Altegio/YCLIENTS + Wahelp) with training. Current setup: CRM system: Altegio (YCLIENTS). Main traffic channel: Instagram… AI & Machine Learning, Bot Development ∙ 22 hours 7 minutes back ∙ 25 proposals |
Automation of creating vertical videos of one type.On YouTube, Footula shorts - the question is whether it is possible to create such videos automatically or semi-automatically (without templates in After Effects), each of which should be unique and adhere to the style of the reference (ideally using textures and items from a… AI & Machine Learning, AI Art ∙ 22 hours 49 minutes back ∙ 8 proposals |
Need consultation on Figma Make and website creation, with the help of Claude, GPT, and Figma.I need consultation on Figma Make and website creation, with the help of Claude, GPT, and Figma. I want to create a website and I can't figure out how to properly design what GPT generates to code it with Claude or Figma. I need someone who can provide consultation. AI & Machine Learning, AI Art ∙ 1 day back ∙ 6 proposals |