Posted on Categories:Discrete Mathematics, 数学代写, 离散数学

数学代写|离散数学代写Discrete Mathematics代考|Search Algorithms

avatest™

avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

数学代写|离散数学代写Discrete Mathematics代考|Search Algorithms

Searching is the process of locating an element in a list. A search algorithm is an algorithm that involves a search problem. Searching a database employs a systematic procedure to find an entry with a key designated as the objective of the search. A search algorithm locates an element $x$ in a list of distinct elements or determines that it is not in the list. The solution to the search is either the location of the element $x$ in the list or 0 if $x$ is not on the list. We now briefly introduce two well-known search algorithms whose worst-case and average time complexities are presented in Table 12.2.

The linear search, also known as the sequential search, is the simplest search algorithm. It is an algorithm, based on the brute-force algorithmic paradigm, that scans the elements of a list in sequence in search of $x$, the element that needs to be located. A comparison is made between $x$ and the first element in the list, if they are the same, then the solution is 1. Otherwise, a comparison is made between $x$ and the second element in the list, if they are the same, then the solution is 2 . This process continues until a match is found and the solution is the location of the element sought. If no match is found, then the solution is 0 . Linear search is applied on unsorted or unordered lists consisting of a small number of elements. Because $n$ comparisons are required to find $x$, the linear search has a time complexity of $O(n)$, which means the time is linearly dependent on the number of elements in the list.

The list of data in a binary search must be in a sorted order for it to work, such as ascending order. This search algorithm, which is quite effective in large sorted array, is based on the divide-and-conquer algorithmic paradigm. A binary search works by comparing the element to be searched with the element in the middle of the array of elements. If we get a match, the position of the middle element is returned. If the target element is less than the middle element, the search continues in the upper half of the array (i.e., the target element is compared to the element in the middle of the upper subarray), and the process repeats itself. If the target element is greater than the middle element, the search continues in the lower half of the array (i.e., the target element is compared to the element in the middle of the lower subarray), and the process repeats itself. By doing this, the algorithm eliminates the half in which the target element cannot lie in each iteration. Assuming the number of elements is $n=2^k$ (i.e., $k=\log _2 n$ ), at most $2 k+2=2 \log _2 n+2$ comparisons are required to perform a binary search. Binary search is thus more efficient than linear search, as it has a time complexity of $O(\log n)$. The worst case occurs when $x$ is not in the list.

数学代写|离散数学代写Discrete Mathematics代考|Deductive Reasoning and Inductive Reasoning

Deductive reasoning, which is top-down logic, contrasts with inductive reasoning, which is bottom-up logic. While the conclusion of a deductive argument is certain, based on the facts provided, the truth of the conclusion of an inductive argument may be probable based upon the evidence given.

Deductive reasoning refers to the process of concluding that something must be true because it is a specific case of a general principle that is already known to be true. Deductive reasoning is the process of reasoning from premises to reach a logically certain conclusion; it is logically valid and is the fundamental method in which mathematical facts are shown to be true. Deductive reasoning provides a guarantee of the truth of the conclusion if the premises (assumptions) are true. In other words, in a deductive argument, the premises are intended to provide such a strong support for the conclusion that, if the premises are true, then it would be impossible for the conclusion to be false. For example, a general principle in plane geometry states that the sum of the angles in any triangle is 180 degrees, then one can conclude that the sum of the angles in an isosceles right triangle is also 180 degrees. Another example is that the colonial powers systematically colonized countries and oppressed their people, then one can conclude that the British Empire, as it was a major colonial power, also colonized countries and oppressed people in a systematic manner. In summary, deductive reasoning requires one to start with a few general ideas, called premises, and apply them to a specific situation. Recognized rules, laws, theories, and other widely accepted truths are used to prove that a conclusion is right.

Inductive reasoning is the process of reasoning that a general principle is true because the special cases are true. Inductive reasoning makes broad generalizations from specific observations. Basically, there is data, and then conclusions are drawn from the data. Inductive reasoning is a process of reasoning in which the premises are viewed as supplying some evidence for the truth of the conclusion. It is also described as a method where one’s experiences and observations, including what are learned from others, are synthesized to come up with a general truth. For example, if all the people one has ever met from a particular country have been racist, one might then conclude all the citizens of that country are racist. Inductive reasoning is not logically valid. Just because all the people one happens to have met from a country were racist is no guarantee at all that all the people from that country are racist. Therefore this form of reasoning has no part in a mathematical proof. Even if all of the premises are true in a statement, inductive reasoning allows for the conclusion to be false. For instance, my neighbor is a grandfather. My neighbor is bald. Therefore all grandfathers are bald. The conclusion does not follow logically from the statements. In summary, inductive reasoning uses a set of specific observations to reach an overarching conclusion. Therefore a few particular premises create a pattern that gives way to a broad idea that is possibly true.

Inductive reasoning is part of the discovery process whereby the observation of special cases leads one to suspect very strongly (though not know with absolute logical certainty) that some general principle is true. Deductive reasoning, on the other hand, is the method you would use to demonstrate with logical certainty that the special case is true. In other words, inductive reasoning is used to formulate hypotheses and theories, and deductive reasoning is employed when applying them to specific situations. The difference between the two kinds of reasoning lies in the relationship between the premises and the conclusion. If the truth of the premises definitely establishes the truth of the conclusion (due to definition, logical structure, or mathematical necessity), then it is deductive reasoning. If the truth of the premises does not definitely establish the truth of the conclusion but nonetheless provides a reason to believe the conclusion may be true, then the argument is inductive.

MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。