Ramsey
2021-02-02
Answered

List all the steps used to search for 9 in the sequence $1,3,4,5,6,8,9,11$ using linear search

You can still ask an expert for help

hesgidiauE

Answered 2021-02-03
Author has **106** answers

It's not at all clear from your question how much detail is expected or whether the steps are to be implemented by a computer or a human. For example, do we need to include steps like "copy value X into memory register Y" or "go grab a sheet of paper to write on"? It's also not clear whether you just want a True or False returned or the position in the list.

But here's the basic procedure that you should be able to complexify as you require.

Check if

Check if

Check if

Check if

Check if

Check if

Check if

Return True.

The basic idea of linear search is to start at the beginning of the list and just keep going through it until you find the value you're looking for or run out of numbers in your list, whichever happens first.

asked 2021-07-28

Let A, B, and C be sets. Show that

asked 2020-11-09

Use proof by Contradiction to prove that the sum of an irrational number and a rational number is irrational.

asked 2021-08-18

Discrete Mathematics Basics

1) Determine whether the relation R on the set of all Web pages is reflexive, symmetric, antisymmetric, and/or transitive, where$(a,b)\in R$ if and only if

I) everyone who has visited Web page a has also visited Web page b.

II) there are no common links found on both Web page a and Web page b.

III) there is at least one common link on Web page a and Web page b.

1) Determine whether the relation R on the set of all Web pages is reflexive, symmetric, antisymmetric, and/or transitive, where

I) everyone who has visited Web page a has also visited Web page b.

II) there are no common links found on both Web page a and Web page b.

III) there is at least one common link on Web page a and Web page b.

asked 2021-08-15

How many elements are in the set
{ 0, { { 0 } }?

asked 2022-07-08

Discrete math: logical equivalent statement and statement forms

"Two statement forms are called logically equivalent if, and only if, they have identical truth values for each possible substitution of statements for their statement variables... denoted $P\equiv Q$.

Two statements are called logically equivalent if, and only if , they have logically equivalent forms when identical component statement variables are used to replace identical component statements."

Later in the exercise section she writes: $p="x>5"$. Do you not use $\equiv $ for statement definitions and if so, how do you symbolise equivalence between two statements, $p\equiv q$ or $p=q$.

Since p and q by them selves could technically be seen as statement forms, is there a difference between $p\equiv q$ and $p=q$?

"Two statement forms are called logically equivalent if, and only if, they have identical truth values for each possible substitution of statements for their statement variables... denoted $P\equiv Q$.

Two statements are called logically equivalent if, and only if , they have logically equivalent forms when identical component statement variables are used to replace identical component statements."

Later in the exercise section she writes: $p="x>5"$. Do you not use $\equiv $ for statement definitions and if so, how do you symbolise equivalence between two statements, $p\equiv q$ or $p=q$.

Since p and q by them selves could technically be seen as statement forms, is there a difference between $p\equiv q$ and $p=q$?

asked 2021-08-12

Give the first six terms of the following sequences. You can assume that the sequences start with an index of 1. Logs are to base 2. Indicate whether the sequence is increasing, decreasing, non-increasing, or non-decreasing. The sequence may have more than one of those properties.

a) The first two terms in the sequence are 1. The rest of the terms are the sum of the two preceding terms plus 1.

b) The n-th term is$n}^{3$ .

c) The n-th term is$2n-5$ .

a) The first two terms in the sequence are 1. The rest of the terms are the sum of the two preceding terms plus 1.

b) The n-th term is

c) The n-th term is

asked 2022-07-01

Let ${A}_{1}$, ${A}_{2}$, P be CPOs and let $\psi :{A}_{1}\times {A}_{2}\to P$ be a map, then $\psi $ is continuous $\phantom{\rule{thickmathspace}{0ex}}\u27fa\phantom{\rule{thickmathspace}{0ex}}$ it is so in each variable separately

Proving this $\Rightarrow $ direction is quite easy, but I am not sure how to conclude the opposite $\Leftarrow $ direction:

If $\bigvee D=({d}_{1},{d}_{2})=\bigvee ({D}_{1}\times {D}_{2})$ , we have:

$\psi (\bigvee D)=\psi ({d}_{1},{d}_{2})={\psi}^{{d}_{1}}({d}_{2})={\psi}_{{d}_{2}}({d}_{1})$ , where

${\psi}^{{d}_{1}}({d}_{2})={\psi}^{\bigvee {D}_{1}}(\bigvee {D}_{2})=\bigvee {\psi}^{\bigvee {D}_{1}}({D}_{2})=\bigvee \psi (\{\bigvee {D}_{1}\}\times {D}_{2})$

and, similarly,

${\psi}_{{d}_{2}}({d}_{1})={\psi}_{\bigvee {D}_{2}}(\bigvee {D}_{1})=\bigvee {\psi}_{\bigvee {D}_{2}}({D}_{1})=\bigvee \psi ({D}_{1}\times \{\bigvee {D}_{2}\})$

how to conclude that $\psi (\bigvee D)=\bigvee \psi (D)$ ?

Proving this $\Rightarrow $ direction is quite easy, but I am not sure how to conclude the opposite $\Leftarrow $ direction:

If $\bigvee D=({d}_{1},{d}_{2})=\bigvee ({D}_{1}\times {D}_{2})$ , we have:

$\psi (\bigvee D)=\psi ({d}_{1},{d}_{2})={\psi}^{{d}_{1}}({d}_{2})={\psi}_{{d}_{2}}({d}_{1})$ , where

${\psi}^{{d}_{1}}({d}_{2})={\psi}^{\bigvee {D}_{1}}(\bigvee {D}_{2})=\bigvee {\psi}^{\bigvee {D}_{1}}({D}_{2})=\bigvee \psi (\{\bigvee {D}_{1}\}\times {D}_{2})$

and, similarly,

${\psi}_{{d}_{2}}({d}_{1})={\psi}_{\bigvee {D}_{2}}(\bigvee {D}_{1})=\bigvee {\psi}_{\bigvee {D}_{2}}({D}_{1})=\bigvee \psi ({D}_{1}\times \{\bigvee {D}_{2}\})$

how to conclude that $\psi (\bigvee D)=\bigvee \psi (D)$ ?