Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
| |
|
|
You are not logged in. Pages: 1
#1 2013-01-23 22:51:43
How to reduce the time checking if two lists contain the same elementsSuppose you have two lists of elements, and you are wondering if they contain the same elements. You observe that the lists have the same lengths. You check that every element of the first list exists among the elements of the second list. To complete the process, you must find out if every element of the second list exists among the elements of the first list. Now you stop and think: is it necessary to do this last step? No, it is not because the following theorem exists: Last edited by Ivar Sand (2013-01-30 23:33:19) I majored in Physics in 1976. Also, I studied mathematics and computer science. I work as a computer programmer. I am from Norway. #2 2013-01-23 23:37:36
Re: How to reduce the time checking if two lists contain the same elementsHi Ivar Sand; In mathematics, you don't understand things. You just get used to them. Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means. 90% of mathematicians do not understand 90% of currently published mathematics. #3 2013-01-24 00:15:02
Re: How to reduce the time checking if two lists contain the same elementsHi Ivar Sand.
Normally to prove that a mapping is bijective, you have to show that it is both injective and surjective. However, if A and B are finite sets with the same number of elements (i.e. m = n) then the two statements above imply that ƒ will be bijective if we can show that it is EITHER injective OR surjective (so we don't have to waste them showing both). #4 2013-01-24 20:22:13
Re: How to reduce the time checking if two lists contain the same elementsbobbym Thanks for your welcome, bobbym. I am glad to be here. I majored in Physics in 1976. Also, I studied mathematics and computer science. I work as a computer programmer. I am from Norway.
Pages: 1
|