Skip to main content

Discrete maths in Pinterest (Algorithms)

Properties of Algorithms
Input -An algorithm has input values from a specified set.
Output -From each set of input values an algorithm produces output values from a specified set. The output values are the solution to the problem.
Definiteness -The steps of an algorithm must be defined precisely.
Correctness -An algorithm should produce the correct output values for each set of input values.
Finiteness -An algorithm should produce the desired output after a finite (but perhaps large) number of steps for any input in the set.
Effectiveness -It must be possible to perform each step of an algorithm exactly and in a finite amount of time.
Generality -The procedure should be suit for all problems of the desired form, not just for a particular set of input values




Complexity in algorithms

Big Oh (O)
Big Oh is often used to describe the worst-case of an algorithm by taking the highest order of a polynomial function and ignoring all the constants value since they aren’t too influential for sufficiently large input.

Big Omega (Ω)
Big Omega is the opposite of Big Oh, if Big Oh was used to describe the upper bound (worst-case) of a asymptotic function, Big Omega is used to describe the lower bound of a asymptotic function. In analysis algorithm, this notation is usually used to describe the complexity of an algorithm in the best-case, which means the algorithm will not be better than its best-case.

Big Theta (Θ)

When an algorithm has a complexity with lower bound = upper bound, say that an algorithm has a complexity O(n log n) and Ω(n log n), it’s actually has the complexity Θ(n log n), which means the running time of that algorithm always falls in n log n in the best-case and worst-case.

Comments

Popular posts from this blog

What is pinterest?

What is pinterest? Pinterest is a social network that allows users to visually share, and discover new interests by posting (known as 'pinning' on Pinterest) images or videos to their own boards. you'll always find Pins to make inspiration. When you discover Pins you like, save them to boards to keep your ideas and easy to find. Pins When everyone find things that they love,they pin it so,Pins are ideas that people on Pinterest find and save from around the internet. Each Pin links back to the website it was saved from. If you click the Pin, you can know the information of its. Home feed Pinterest remember category,prople,topics and boards that you often find or save it to pins and show them to your home feed every time you go through pinterest. Boards Your saved pins ,it saved on your boards and you can manage everything you want on your boards to share more ideas to others. Profile Your profile will be a mirror that reflect who you are to other p...

Search engine

          If you get many pictures on your boards,Pinterest will combine it together with keywords and category that makes from user all over the world to be a function in pinterest that’s called ‘Pins’.           Search engine works by combine pins with the category all your own pictures to make everytime .That user get into the app, Pins shows their last favourite pictures that they used to pins before. Let’s understand the type of searching! Searching Algorithms           Search algorithms are very important for many programs. Searchers looking for database, such as looking up your score record in the database. Although programmers can choose from search types, they select the algorithm that best matches the size and structure of the database.