1. Algorithms and data structure: general algorithms
Hook
Key details
General algorithms: Sort, Search, Encryption
More details
10 general algorithms: 6x sort algorithms 2x search algorithms 2x encryption algorithms
Bubble sort: Bubble sort is a method of sorting discrete data in ascending or descending order by
repeatedly comparing the size of adjacent elements and sorting them.
Selection sort: Selection sort is a method of finding the smallest (or largest) value in the target data and
exchanging it with the first value, and by repeating this process, the data is aligned as a whole.
Insertion sort: Insertion sort is a method of determining the order in which retrieved values are arranged
and inserting them one after another. Specifically, it checks the numbers one by one from the unsorted
data and inserts them into the appropriate positions in the sorted column.
Merge sort: Merge sort is a method of repeatedly dividing the data to be sorted into two parts,
subdividing the data until the number of elements reaches 1, and then sorting the subdivided elements
back together.
Quick sort: Quick sort is a method of repeatedly sorting into groups of "values smaller than the standard
value" and "values larger than the standard value" by setting an appropriate standard value.
Heap sort: Heap sort is a method of sorting unaligned data into a tree structure with "heap" properties,
extracting the largest or smallest value from it, and repeating this process to align the entire structure.
Linear search: Linear search is a technique in which a sequence of data stored in such as an array is
compared from the beginning to the end of the sequence to see if it matches the data being searched for.
Binary search: Binary search is an efficient algorithm for finding an item from a sorted list of items. It
works by repeatedly dividing in half the portion of the list that could contain the item, until you've
narrowed down the possible locations to just one.
RSA: The RSA algorithm (Rivest-Shamir-Adleman) is the basis of a cryptosystem -- a suite of cryptographic
algorithms that are used for specific security services or purposes -- which enables public key encryption
and is widely used to secure sensitive data.
AES: AES (Advanced Encryption Standard) is a symmetric block cipher chosen by the U.S. government to
protect classified information. AES is implemented in software and hardware throughout the world to
encrypt sensitive data.
What is algorithm
An algorithm is a set of instructions for
solving a problem or accomplishing a task.
Sort: There are many opportunities to handle large
amounts of data, including databases. In such cases,
data must be sorted according to certain rules, such
as ascending or descending order. The technology for
this is sorting algorithms.
Search: An algorithm that finds the desired data
among multiple sets of data is called a search
algorithm.
Encryption: An encryption algorithm is a procedure
or rule for the encryption process. For example,
when encrypting "ABC" to "BCD”, the algorithm is to
shift one backward in alphabetical order. Search algorithms
2. Control Algorithms
Hook
What do you need to run robots the way you want do?
Key details
Algorism is used to solve a class of specific problems or to
perform a computation.
As simple example is “The Algorithm Exercise” for a
program called Pythagora Switch,
In this exercise, repeat a fixed movement and you can
exercise without colliding.
It is solving the problem of
colliding with a neighbor.
Control Algorithm is a kind of algorithm. It can
run robots the way you want do.
Control the robot by repeating a fixed cycle at high speed.
It can also implement more efficient programs if the right
algorithm is used.
More details
1.Sort algorithm: Sort randomly stored data
2.Search algorithm: Find data matches conditions
3.Encryption algorithm: Data Encryption/Combination
4. Genetic algorithm: Used in ML (Machine Learning).
For example, genetic algorithm used in control to walk robot.
DE : Right Figure➡
Using it to search tangent
strength to joints impede robot
walking. You can find the best
tangent strength and site for
walking unstable. By repeating
simulation and calculation
expected value and value if estimating the value of the
environment.
3. Algorithms and data structures: sort-algorithms
How would you sort these numbers?
1, 4, 62, 526, 21, 67, 21, 32, 4571, 1256, 51, 21, 4, 298, 1, 6
What is algorithms and sort-algo?
Algorithms can be directly translated as simply “calculation
procedures” but more simply and generally, they are
“procedures for accomplishing something ”. For example,
suppose you eat jam butter bread for breakfast. In this
case, this series of operations, “take the bread out of the
bag → toast it → butter it → put jam on it → and eat it”
can also be said to be a kind of algorithm.
“Sorting” refers to the process of sorting a sequence of
numbers in ascending or descending order. The algorithm
used for this process is called a sorting algorithm. Because
sorting is a simple problem but difficult to solve efficiently,
sorting algorithms have been actively studied since the
dawn of computer science. Sorting is often classified by its
stability and computational complexity (alignment speed),
among other factors.
Kind of sort-algo and the computational complexity
Algorithms are often evaluated in terms of time-computation. The big-O notation is
often used, expressed as O(𝑛) or O(log 𝑛). The smaller the content of the parentheses,
the smaller the computational complexity. Let's take a look at the different types of
sorting and the amount of calculation
① Bubble sort
This sorting is done by comparing all elements with their neighbors and replacing
them if they are in the opposite order. The worst-case computational complexity is
𝑂(𝑛2
), which is a slow algorithm. It is known as a stable sort.
② Marge sort
When merging multiple columns that are already aligned into a single column, the
algorithm believes that if the smaller columns are placed in the new column first, the
new column is also aligned. The worst-case computational complexity is 𝑂(𝑛 log 𝑛).
③ Quick sort
It is generally said to be the fastest compared to other sorting methods, but it is not
always fast depending on the sequence of the target data and the number of data, and
the worst-case computational complexity is O(𝑛2
).
④ Bogo sort
The worst-case computational complexity is O(∞), which is known as a very inefficient
algorithm. Moreover, it is not stable. It is ridiculed as a sort that even a monkey can
understand. Using Trump as an example, it would look like this
1. Toss a bundle of 52 playing cards and break them apart.
2. Pick up everything at random, one piece at a time.
3. Check to see if they are sorted. If not, repeat steps 1 through 3.
4. Algorithms and data structures:
Stack and Queue
Hook
Key details
More details
Stack and Queue are abstract data type
which is a collection of elements and has
operations on data of this type. These
are important for holding data efficiently.
Stack collects data like a stack of books.
It adds the data to the top and removes
the data from the top. Also, Queue
collects data like a queue at a bus stop. It
adds the data to the tail and removes
the data from the head.
Do you know stack and queue?
Do you know how to make stack and
queue?
Stack is called as FILO (First In Last Out).
Queue is called as FIFO (First In First Out).
Stack: First, we make some array data. Second, we make a
variable which records the top of the array data having a
number. If we remove the top of the array data from the stack,
then we decrease the number of the top of the array data by 1.
If we add the number, then we add the number on the top of
the array data and increase the number of the top of the array
data by 1.
Queue: First, we make some array data. Second, we make
variables which record the head and tail of the array data
having a number. If we remove the head of the array data from
the stack, then we decrease the number of the head of the
array data by 1. If we add the number, then we add the number
to the tail of the array data and increase the number of the tail
of the array data by 1.