Self-Organizing Tuple Reconstruction in Column-Stores

Total Page:16

File Type:pdf, Size:1020Kb

Self-Organizing Tuple Reconstruction in Column-Stores Self-organizing Tuple Reconstruction in Column-stores Stratos Idreos Martin L. Kersten Stefan Manegold CWI Amsterdam CWI Amsterdam CWI Amsterdam The Netherlands The Netherlands The Netherlands [email protected] [email protected] [email protected] ABSTRACT 1. INTRODUCTION Column-stores gained popularity as a promising physical de- A prime feature of column-stores is to provide improved sign alternative. Each attribute of a relation is physically performance over row-stores in the case that workloads re- stored as a separate column allowing queries to load only quire only a few attributes of wide tables at a time. Each the required attributes. The overhead incurred is on-the-fly relation R is physically stored as a set of columns; one col- tuple reconstruction for multi-attribute queries. Each tu- umn for each attribute of R. This way, a query needs to load ple reconstruction is a join of two columns based on tuple only the required attributes from each relevant relation. IDs, making it a significant cost component. The ultimate This happens at the expense of requiring explicit (partial) physical design is to have multiple presorted copies of each tuple reconstruction in case multiple attributes are required. base table such that tuples are already appropriately orga- Each tuple reconstruction is a join between two columns nized in multiple different orders across the various columns. based on tuple IDs/positions and becomes a significant cost This requires the ability to predict the workload, idle time component in column-stores especially for multi-attribute to prepare, and infrequent updates. queries [2, 6, 10]. Whenever possible, position-based join- In this paper, we propose a novel design, partial side- matching and sequential data access are exploited. For each ways cracking, that minimizes the tuple reconstruction cost relation Ri in a query plan q, a column-store needs to per- in a self-organizing way. It achieves performance similar form at least Ni − 1 tuple reconstruction operations for Ri to using presorted data, but without requiring the heavy within q, given that Ni attributes of Ri participate in q. initial presorting step itself. Instead, it handles dynamic, Column-stores perform tuple reconstruction in two ways [2]. unpredictable workloads with no idle time and frequent up- With early tuple reconstruction, the required attributes are dates. Auxiliary dynamic data structures, called cracker glued together as early as possible, i.e., while the columns maps, provide a direct mapping between pairs of attributes are loaded, leveraging N-ary processing to evaluate the query. used together in queries for tuple reconstruction. A map On the other hand, late tuple reconstruction exploits the is continuously physically reorganized as an integral part of column-store architecture to its maximum. During query query evaluation, providing faster and reduced data access processing, \reconstruction" merely refers to getting the at- for future queries. To enable flexible and self-organizing be- tribute values of qualifying tuples from their base columns as havior in storage-limited environments, maps are material- late as possible, i.e., only once an attribute is required in the ized only partially as demanded by the workload. Each map query plan. This approach allows the query engine to exploit is a collection of separate chunks that are individually reor- CPU- and cache-optimized vector-like operator implementa- ganized, dropped or recreated as needed. We implemented tions throughout the whole query evaluation. N-ary tuples partial sideways cracking in an open-source column-store. A are formed only once the final result is delivered. detailed experimental analysis demonstrates that it brings Like most modern column-stores [12, 4, 15], we focus on significant performance benefits for multi-attribute queries. late reconstruction. Comparing early and late reconstruc- Categories and Subject Descriptors: H.2 [DATABASE tion, the educative analysis in [2] observes that the latter MANAGEMENT]: Physical Design - Systems incurs the overhead of reconstructing a column more than once, in case it occurs more than once in a query. Further- General Terms: Algorithms, Performance, Design more, exploiting sequential access patterns during recon- Keywords: Database Cracking, Self-organization struction is not always possible since many operators (joins, group by, order by etc.) are not tuple order-preserving. The ultimate access pattern is to have multiple copies for each relation R, such that each copy is presorted on an other attribute in R. All tuple reconstructions of R attributes initiated by a restriction on an attribute A can be performed Permission to make digital or hard copies of all or part of this work for using the copy that is sorted on A. This way, the tuple personal or classroom use is granted without fee provided that copies are reconstruction does not only exploit sequential access, but not made or distributed for profit or commercial advantage and that copies also benefits from focused access to only a small consecutive bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific area in the base column (as defined by the restriction on A) permission and/or a fee. rather than scattered access to the whole column. However, SIGMOD’09, June 29–July 2, 2009, Providence, Rhode Island, USA. such a direction requires the ability to predict the workload Copyright 2009 ACM 978-1-60558-551-2/09/06 ...$5.00. 1 and the luxury of idle time to prepare the physical design. lection of Binary Association Tables (BATs). Each BAT is In addition, up to date there is no efficient way to maintain a set of two columns. For a relation R of k attributes, there multiple sorted copies under updates in a column-store; thus exist k BATs, each BAT storing the respective attribute as it requires read-only or infrequently updated environments. (key,attr) pairs. The system-generated key identifies the In this paper, we propose a self-organizing direction that relational tuple that attribute value attr belongs to, i.e., all achieves performance similar to using presorted data, but attribute values of a single tuple are assigned the same key. comes without the hefty initial price tag of presorting it- Key values form a dense ascending sequence representing the self. Instead, it handles dynamic unpredictable workloads position of an attribute value in the column. Thus, for base with frequent updates and with no need for idle time. Our BATs, the key column typically is a virtual non-materialized approach exploits database cracking [7, 8, 9] that sets a column. For each relational tuple t of R, all attributes of t promising direction towards continuous self-organization of are stored in the same position in their respective column data storage based on selections in incoming queries. representations. The position is determined by the inser- We introduce a novel design, partial sideways cracking, tion order of the tuples. This tuple-order alignment across that provides a self-organizing behavior for both selections all base columns allows the column-oriented system to per- and tuple reconstructions. It gracefully handles any kind form tuple reconstructions efficiently in the presence of tuple of complex multi-attribute query. It uses auxiliary self- order-preserving operators. Basically, the task boils down organizing data structures to materialize mappings between to a simple merge-like sequential scan over two columns, re- pairs of attributes used together in queries for tuple recon- sulting in low data access costs through all levels of modern struction. Based on the workload, these cracker maps are hierarchical memory systems. Let us go through some of the continuously kept aligned by being physically reorganized, basic operators of MonetDB's two-column physical algebra. while processing queries, allowing the DBMS to handle tuple Operator select(A,v1,v2) searches all (key,attr) pairs reconstruction using cache-friendly access patterns. in base column A for attribute values between v1 and v2. For To enhance performance and adaptability, in particular in each qualifying attribute value, the key value (position) is environments with storage restrictions, cracker maps are im- included in the result. Since selections are mostly performed plemented as dynamic collections of separate chunks. This on base columns, the underlying implementation preserves enables flexible storage management by adaptively main- the key-order also in the intermediate results. taining only those chunks of a map that are required to Operator join(j1,j2) performs a join between attr1 of process incoming queries. Chunks adapt individually to the j1 and attr2 of j2. The result contains the qualifying query workload. Each chunk of a map is separately reorga- (key1,key2) pairs. In general, this operator can maintain nized, dropped if extra storage space is needed, or recreated the tuple order only for the outer join input. (entirely or in parts) if necessary. Similarly, groupby and orderby operators cannot main- We implemented partial sideways cracking on top of an tain tuple order for any of their inputs. open-source column-oriented DBMS, MonetDB1 [15]. The Operator reconstruct(A,r) returns all (key,attr) pairs paper presents an extensive experimental analysis using both of base column A at the positions specified by r. If r is the synthetic workloads and the TPC-H benchmark. It clearly result of a tuple order-preserving operator, then iterating shows that partial sideways cracking brings a self-organizing over r, it uses cache-friendly in-order positional lookups into behavior and significant benefits even in the presence of ran- A. Otherwise, it requires expensive random access patterns. dom workloads, storage restrictions and updates. The remainder of this paper is organized as follows. Sec- 2.2 Selection-based Cracking tion 2 provides the necessary background.
Recommended publications
  • On Free Products of N-Tuple Semigroups
    n-tuple semigroups Anatolii Zhuchok Luhansk Taras Shevchenko National University Starobilsk, Ukraine E-mail: [email protected] Anatolii Zhuchok Plan 1. Introduction 2. Examples of n-tuple semigroups and the independence of axioms 3. Free n-tuple semigroups 4. Free products of n-tuple semigroups 5. References Anatolii Zhuchok 1. Introduction The notion of an n-tuple algebra of associative type was introduced in [1] in connection with an attempt to obtain an analogue of the Chevalley construction for modular Lie algebras of Cartan type. This notion is based on the notion of an n-tuple semigroup. Recall that a nonempty set G is called an n-tuple semigroup [1], if it is endowed with n binary operations, denoted by 1 ; 2 ; :::; n , which satisfy the following axioms: (x r y) s z = x r (y s z) for any x; y; z 2 G and r; s 2 f1; 2; :::; ng. The class of all n-tuple semigroups is rather wide and contains, in particular, the class of all semigroups, the class of all commutative trioids (see, for example, [2, 3]) and the class of all commutative dimonoids (see, for example, [4, 5]). Anatolii Zhuchok 2-tuple semigroups, causing the greatest interest from the point of view of applications, occupy a special place among n-tuple semigroups. So, 2-tuple semigroups are closely connected with the notion of an interassociative semigroup (see, for example, [6, 7]). Moreover, 2-tuple semigroups, satisfying some additional identities, form so-called restrictive bisemigroups, considered earlier in the works of B. M. Schein (see, for example, [8, 9]).
    [Show full text]
  • Equivalents to the Axiom of Choice and Their Uses A
    EQUIVALENTS TO THE AXIOM OF CHOICE AND THEIR USES A Thesis Presented to The Faculty of the Department of Mathematics California State University, Los Angeles In Partial Fulfillment of the Requirements for the Degree Master of Science in Mathematics By James Szufu Yang c 2015 James Szufu Yang ALL RIGHTS RESERVED ii The thesis of James Szufu Yang is approved. Mike Krebs, Ph.D. Kristin Webster, Ph.D. Michael Hoffman, Ph.D., Committee Chair Grant Fraser, Ph.D., Department Chair California State University, Los Angeles June 2015 iii ABSTRACT Equivalents to the Axiom of Choice and Their Uses By James Szufu Yang In set theory, the Axiom of Choice (AC) was formulated in 1904 by Ernst Zermelo. It is an addition to the older Zermelo-Fraenkel (ZF) set theory. We call it Zermelo-Fraenkel set theory with the Axiom of Choice and abbreviate it as ZFC. This paper starts with an introduction to the foundations of ZFC set the- ory, which includes the Zermelo-Fraenkel axioms, partially ordered sets (posets), the Cartesian product, the Axiom of Choice, and their related proofs. It then intro- duces several equivalent forms of the Axiom of Choice and proves that they are all equivalent. In the end, equivalents to the Axiom of Choice are used to prove a few fundamental theorems in set theory, linear analysis, and abstract algebra. This paper is concluded by a brief review of the work in it, followed by a few points of interest for further study in mathematics and/or set theory. iv ACKNOWLEDGMENTS Between the two department requirements to complete a master's degree in mathematics − the comprehensive exams and a thesis, I really wanted to experience doing a research and writing a serious academic paper.
    [Show full text]
  • Python Mock Test
    PPYYTTHHOONN MMOOCCKK TTEESSTT http://www.tutorialspoint.com Copyright © tutorialspoint.com This section presents you various set of Mock Tests related to Python. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself. PPYYTTHHOONN MMOOCCKK TTEESSTT IIII Q 1 - What is the output of print tuple[2:] if tuple = ′abcd′, 786, 2.23, ′john′, 70.2? A - ′abcd′, 786, 2.23, ′john′, 70.2 B - abcd C - 786, 2.23 D - 2.23, ′john′, 70.2 Q 2 - What is the output of print tinytuple * 2 if tinytuple = 123, ′john′? A - 123, ′john′, 123, ′john′ B - 123, ′john′ * 2 C - Error D - None of the above. Q 3 - What is the output of print tinytuple * 2 if tinytuple = 123, ′john′? A - 123, ′john′, 123, ′john′ B - 123, ′john′ * 2 C - Error D - None of the above. Q 4 - Which of the following is correct about dictionaries in python? A - Python's dictionaries are kind of hash table type. B - They work like associative arrays or hashes found in Perl and consist of key-value pairs. C - A dictionary key can be almost any Python type, but are usually numbers or strings. Values, on the other hand, can be any arbitrary Python object. D - All of the above. Q 5 - Which of the following function of dictionary gets all the keys from the dictionary? A - getkeys B - key C - keys D - None of the above.
    [Show full text]
  • Efficient Skyline Computation Over Low-Cardinality Domains
    Efficient Skyline Computation over Low-Cardinality Domains MichaelMorse JigneshM.Patel H.V.Jagadish University of Michigan 2260 Hayward Street Ann Arbor, Michigan, USA {mmorse, jignesh, jag}@eecs.umich.edu ABSTRACT Hotel Parking Swim. Workout Star Name Available Pool Center Rating Price Current skyline evaluation techniques follow a common paradigm Slumber Well F F F ⋆ 80 that eliminates data elements from skyline consideration by find- Soporific Inn F T F ⋆⋆ 65 ing other elements in the dataset that dominate them. The perfor- Drowsy Hotel F F T ⋆⋆ 110 mance of such techniques is heavily influenced by the underlying Celestial Sleep T T F ⋆ ⋆ ⋆ 101 Nap Motel F T F ⋆⋆ 101 data distribution (i.e. whether the dataset attributes are correlated, independent, or anti-correlated). Table 1: A sample hotels dataset. In this paper, we propose the Lattice Skyline Algorithm (LS) that is built around a new paradigm for skyline evaluation on datasets the Soporific Inn. The Nap Motel is not in the skyline because the with attributes that are drawn from low-cardinality domains. LS Soporific Inn also contains a swimming pool, has the same number continues to apply even if one attribute has high cardinality. Many of stars as the Nap Motel, and costs less. skyline applications naturally have such data characteristics, and In this example, the skyline is being computed over a number of previous skyline methods have not exploited this property. We domains that have low cardinalities, and only one domain that is un- show that for typical dimensionalities, the complexity of LS is lin- constrained (the Price attribute in Table 1).
    [Show full text]
  • Canonical Models for Fragments of the Axiom of Choice∗
    Canonical models for fragments of the axiom of choice∗ Paul Larson y Jindˇrich Zapletal z Miami University University of Florida June 23, 2015 Abstract We develop a technology for investigation of natural forcing extensions of the model L(R) which satisfy such statements as \there is an ultrafil- ter" or \there is a total selector for the Vitali equivalence relation". The technology reduces many questions about ZF implications between con- sequences of the axiom of choice to natural ZFC forcing problems. 1 Introduction In this paper, we develop a technology for obtaining certain type of consistency results in choiceless set theory, showing that various consequences of the axiom of choice are independent of each other. We will consider the consequences of a certain syntactical form. 2 ! Definition 1.1. AΣ1 sentence Φ is tame if it is of the form 9A ⊂ ! (8~x 2 !! 9~y 2 A φ(~x;~y))^(8~x 2 A (~x)), where φ, are formulas which contain only numerical quantifiers and do not refer to A anymore, and may refer to a fixed analytic subset of 2! as a predicate. The formula are called the resolvent of the sentence. This is a syntactical class familiar from the general treatment of cardinal invari- ants in [11, Section 6.1]. It is clear that many consequences of Axiom of Choice are of this form: Example 1.2. The following statements are tame consequences of the axiom of choice: 1. there is a nonprincipal ultrafilter on !. The resolvent formula is \T rng(x) is infinite”; ∗2000 AMS subject classification 03E17, 03E40.
    [Show full text]
  • Session 5 – Main Theme
    Database Systems Session 5 – Main Theme Relational Algebra, Relational Calculus, and SQL Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Presentation material partially based on textbook slides Fundamentals of Database Systems (6th Edition) by Ramez Elmasri and Shamkant Navathe Slides copyright © 2011 and on slides produced by Zvi Kedem copyight © 2014 1 Agenda 1 Session Overview 2 Relational Algebra and Relational Calculus 3 Relational Algebra Using SQL Syntax 5 Summary and Conclusion 2 Session Agenda . Session Overview . Relational Algebra and Relational Calculus . Relational Algebra Using SQL Syntax . Summary & Conclusion 3 What is the class about? . Course description and syllabus: » http://www.nyu.edu/classes/jcf/CSCI-GA.2433-001 » http://cs.nyu.edu/courses/fall11/CSCI-GA.2433-001/ . Textbooks: » Fundamentals of Database Systems (6th Edition) Ramez Elmasri and Shamkant Navathe Addition Wesley ISBN-10: 0-1360-8620-9, ISBN-13: 978-0136086208 6th Edition (04/10) 4 Icons / Metaphors Information Common Realization Knowledge/Competency Pattern Governance Alignment Solution Approach 55 Agenda 1 Session Overview 2 Relational Algebra and Relational Calculus 3 Relational Algebra Using SQL Syntax 5 Summary and Conclusion 6 Agenda . Unary Relational Operations: SELECT and PROJECT . Relational Algebra Operations from Set Theory . Binary Relational Operations: JOIN and DIVISION . Additional Relational Operations . Examples of Queries in Relational Algebra . The Tuple Relational Calculus . The Domain Relational Calculus 7 The Relational Algebra and Relational Calculus . Relational algebra . Basic set of operations for the relational model . Relational algebra expression . Sequence of relational algebra operations . Relational calculus . Higher-level declarative language for specifying relational queries 8 Unary Relational Operations: SELECT and PROJECT (1/3) .
    [Show full text]
  • Defining Sets
    Math 134 Honors Calculus Fall 2016 Handout 4: Sets All of mathematics uses set theory as an underlying foundation. Intuitively, a set is a collection of objects, considered as a whole. The objects that make up the set are called its elements or its members. The elements of a set may be any objects whatsoever, but for our purposes, they will usually be mathematical objects such as numbers, functions, or other sets. The notation x ∈ X means that the object x is an element of the set X. The words collection and family are synonyms for set. In rigorous axiomatic developments of set theory, the words set and element are taken as primitive undefined terms. (It would be very difficult to define the word “set” without using some word such as “collection,” which is essentially a synonym for “set.”) Instead of giving a general mathematical definition of what it means to be a set, or for an object to be an element of a set, mathematicians characterize each particular set by giving a precise definition of what it means for an object to be a element of that set—this is called the set’s membership criterion. The membership criterion for a set X is a statement of the form “x ∈ X ⇔ P (x),” where P (x) is some sentence that is true precisely for those objects x that are elements of X, and no others. For example, if Q is the set of all rational numbers, then the membership criterion for Q might be expressed as follows: x ∈ Q ⇔ x = p/q for some integers p and q with q 6= 0.
    [Show full text]
  • The Number of Countable Models
    The number of countable models Enrique Casanovas March 11, 2012 ∗ 1 Small theories Definition 1.1 T is small if for all n < !, jSn(;)j ≤ !. Remark 1.2 If T is small, then there is a countable L0 ⊆ L such that for every '(x) 2 L 0 0 there is some ' (x) 2 L0 such that in T , '(x) ≡ ' (x). Hence, T is a definitional extension of the countable theory T0 = T L0. Proof: See Remark 14.25 in [4]. With respect to the second assertion, consider some n-ary relation symbol R 2 L r L0. There is some formula '(x1; : : : ; xn) 2 L0 equivalent to Rx1 : : : xn in T . If we add all the definitions 8x1 : : : xn(Rx1 : : : xn $ '(x1; : : : ; xn)) (and similar definitions for constants and function symbols) to T0 we obtain T . 2 Lemma 1.3 The following are equivalent: 1. T is small. 2. For all n < !, for all finite A, jSn(A)j ≤ !. 3. For all finite A, jS1(A)j ≤ !. 4. T has a saturated countable model. Proof: See Remark 14.26 in [4]. Some topological considerations are helpful for the following discussions. A boolean2 topological space X can be decomposed using the Cantor-Bendixson derivative as [ (α) (α+1) 1 X = ( X r X ) [ X α2On (0) (α+1) (α) (β) T where X = X, X is the set of accumulation points of X , X = α<β Xα for (1) T (1) limit β and X = α2On Xα. All Xα are closed. The perfect kernel X does not contain isolated points (with respect to the induced topology) and hence it is empty or it <! contains a binary tree (Us : s 2 2 ) of nonempty clopen sets Us with Us = Usa0[_ Usa1, which gives 2! many points in X(1).
    [Show full text]
  • A Understanding Cardinality Estimation Using Entropy Maximization
    A Understanding Cardinality Estimation using Entropy Maximization CHRISTOPHER RE´ , University of Wisconsin–Madison DAN SUCIU, University of Washington, Seattle Cardinality estimation is the problem of estimating the number of tuples returned by a query; it is a fundamentally important task in data management, used in query optimization, progress estimation, and resource provisioning. We study cardinality estimation in a principled framework: given a set of statistical assertions about the number of tuples returned by a fixed set of queries, predict the number of tuples returned by a new query. We model this problem using the probability space, over possible worlds, that satisfies all provided statistical assertions and maximizes entropy. We call this the Entropy Maximization model for statistics (MaxEnt). In this paper we develop the mathematical techniques needed to use the MaxEnt model for predicting the cardinality of conjunctive queries. Categories and Subject Descriptors: H.2.4 [Database Management]: Systems—Query processing General Terms: Theory Additional Key Words and Phrases: Cardinality Estimation, Entropy Models, Entropy Maximization, Query Processing 1. INTRODUCTION Cardinality estimation is the process of estimating the number of tuples returned by a query. In rela- tional database query optimization, cardinality estimates are key statistics used by the optimizer to choose an (expected) lowest cost plan. As a result of the importance of the problem, there are many sources of statistical information available to the optimizer, e.g., query feedback records [Stillger et al. 2001; Chaudhuri et al. 2008] and distinct value counts [Alon et al. 1996], and many models to capture some portion of the available statistical information, e.g., histograms [Poosala and Ioannidis 1997; Kaushik and Suciu 2009], samples [Haas et al.
    [Show full text]
  • On the Necessary Use of Abstract Set Theory
    ADVANCES IN MATHEMATICS 41, 209-280 (1981) On the Necessary Use of Abstract Set Theory HARVEY FRIEDMAN* Department of Mathematics, Ohio State University, Columbus, Ohio 43210 In this paper we present some independence results from the Zermelo-Frankel axioms of set theory with the axiom of choice (ZFC) which differ from earlier such independence results in three major respects. Firstly, these new propositions that are shown to be independent of ZFC (i.e., neither provable nor refutable from ZFC) form mathematically natural assertions about Bore1 functions of several variables from the Hilbert cube I” into the unit interval, or back into the Hilbert cube. As such, they are of a level of abstraction significantly below that of the earlier independence results. Secondly, these propositions are not only independent of ZFC, but also of ZFC together with the axiom of constructibility (V = L). The only earlier examples of intelligible statements independent of ZFC + V= L either express properties of formal systems such as ZFC (e.g., the consistency of ZFC), or assert the existence of very large cardinalities (e.g., inaccessible cardinals). The great bulk of independence results from ZFCLthe ones that involve standard mathematical concepts and constructions-are about sets of limited cardinality (most commonly, that of at most the continuum), and are obtained using the forcing method introduced by Paul J. Cohen (see [2]). It is now known in virtually every such case, that these independence results are eliminated if V= L is added to ZFC. Finally, some of our propositions can be proved in the theory of classes, as formalized by the Morse-Kelley class theory with the axiom of choice for sets (MKC), but not in ZFC.
    [Show full text]
  • Small Gaps Between Three Almost Primes and Almost Prime Powers
    SMALL GAPS BETWEEN THREE ALMOST PRIMES AND ALMOST PRIME POWERS DANIEL A. GOLDSTON, APOORVA PANIDAPU, AND JORDAN SCHETTLER Abstract. A positive integer is called an Ej -number if it is the product of j distinct primes. We prove that there are infinitely many triples of E2-numbers within a gap size of 32 and infinitely many triples of E3-numbers within a gap size of 15. Assuming the Elliot-Halberstam conjecture for primes and E2- numbers, we can improve these gaps to 12 and 5, respectively. We can obtain even smaller gaps for almost primes, almost prime powers, or integers having the same exponent pattern in the their prime factorizations. In particular, if d(x) denotes the number of divisors of x, we prove that there are integers a, b with 1 ≤ a < b ≤ 9 such that d(x) = d(x + a) = d(x + b) = 192 for infinitely many x. Assuming Elliot-Halberstam, we prove that there are integers a, b with 1 ≤ a < b ≤ 4 such that d(x) = d(x + a) = d(x + b) = 24 for infinitely many x. 1. Introduction For our purposes, an almost prime or almost prime power will refer to a positive integer with some fixed small number of prime factors counted with or without multiplicity, respectively. Small gaps between primes and almost primes became a popular subject of research following the results of the GPY sieve [GPY09] and Yitang Zhang’s subsequent proof of bounded gaps between primes [Zha14]. For a positive integer x, let Ω(x) denote the number of prime factors of x counted with multiplicity, and let ω(x) denote the number of prime factors of x counted without multiplicity, i.e., ω(x) is the number of distinct primes dividing x.
    [Show full text]
  • LECTURE 18 1. Chapter 6.1 Again! Definition (Ordered N-Tuple)
    DISCRETE MATH: LECTURE 18 DR. DANIEL FREEMAN 1. Chapter 6.1 again! Definition (ordered n-tuple). Let n be a positive integer and let x1; x2; :::; xn be n ele- ments. (x1; x2) is called an ordered pair,(x1; x2; x3) is called an ordered triple, and (x1; x2; :::; xn) is called an ordered n-tuple. Two n-tuples (x1; x2; :::; xn) and (y1; y2; :::; yn) are equal if and only if x1 = y1, x2 = y2, ..., xn = yn. That is: (x1; x2; :::; xn) = (y1; y2; :::; yn) , x1 = y1; x2 = y2; :::; xn = yn Examples: • Is (1; 2; 3) = (1; 2; 3; 4)? • Is f1; 2; 3g = (1; 2; 3)? • Is (1; 2; 3) = (1; 3; 2)? 1 2 DR. DANIEL FREEMAN 1.1. Cartesian Products. Definition. Given sets A1;A2;A3; ::; An, the Cartesian Product of A1;A2; :::; An de- noted A1 × A2 × ::: × An is the set of all ordered n-tuples (a1; a2; :::; an) where a1 2 A1; a2 2 A2; :::; an 2 An. Symbolically, that is: A1 × A2 × ::: × An = f(a1; a2; :::; an) k a1 2 A1; a2 2 A2; :::; an 2 Ang: In particular, A1 × A2 = f(a1; a2) k a1 2 A1; a2 2 A2g: Example: A = x; y, B = 1; 2; 3, and C = a; b • A × B = • (A × B) × C = • A × B × C = DISCRETE MATH: LECTURE 18 3 2. 7.1 Functions Definition. A function f from a set X to a set Y , denoted f : X ! Y , is a relation with domain X and co-domain Y that satisfies the two properties: (1) every element in X is related to an element in Y .
    [Show full text]