text:
Article Text

Genomics of elite sporting performance: what little we know and necessary advances
2. Guan Wang1,
3. Bernd Wolfarth2,
4. Robert Scott3,
5. Noriyuki Fuku4,
6. Eri Mikami4,
7. Zihong He5,
8. Carmen Fiuza-Luces6,
9. Nir Eynon7,
10. Alejandro Lucia6
1. 1College of Medicine, Veterinary and Life Sciences, Institute of Cardiovascular and Medical Sciences, University of Glasgow, Glasgow, Lanarkshire, UK
2. 2Department of Preventive and Rehabilitative Sports Medicine, Technical University Munich, Munich, Germany
3. 3MRC Epidemiology Unit, Institute of Metabolic Science, Cambridge, UK
4. 4Department of Genomics for Longevity and Health, Tokyo Metropolitan Institute of Gerontology, Tokyo, Japan
5. 5Biology Center, China Institute of Sport Science, Beijing, China
6. 6School of Doctorate Studies and Research, European University of Madrid, Madrid, Spain
7. 7Institute of Sport, Exercise and Active Living (ISEAL), Victoria University, Melbourne, Australia
1. Correspondence to Dr Yannis Pitsiladis, College of Medicine, Veterinary and Life Sciences, Institute of Cardiovascular and Medical Sciences, University of Glasgow, Glasgow, G12 8QQ, Scotland; Yannis.Pitsiladis{at}Glasgow.ac.uk

## Abstract

Numerous reports of genetic associations with performance-related phenotypes have been published over the past three decades but there has been limited progress in discovering and characterising the genetic contribution to elite/world-class performance, mainly owing to few coordinated research efforts involving major funding initiatives/consortia and the use primarily of the candidate gene analysis approach. It is timely that exercise genomics research has moved into a new era utilising well-phenotyped, large cohorts and genome-wide technologies—approaches that have begun to elucidate the genetic basis of other complex traits/diseases. This review summarises the most recent and significant findings from sports genetics and explores future trends and possibilities.

• Genetics/sex testing

## Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.

## Introduction

Despite numerous attempts in recent years to discover genetic variants associated with elite athletic performance and, more specifically, elite/world-class athletic status, there has been limited progress owing to few coordinated research efforts involving major funding initiatives/consortia and the reliance on candidate gene analyses, involving a small number of single nucleotide polymorphisms (SNPs) and structural variants (eg, the commonly studied insertion/deletion polymorphisms). Nevertheless, over 200 SNPs associated with physical-performance traits, and over 20 SNPs associated with elite athletic status, have been reported in the literature and summarised on a yearly basis in the ‘The Human Gene Map for Performance and Health-related Fitness Phenotypes’ until 2009.1 Owing to the massive increase in related papers, the authors have changed the format summarising only the key findings of each year in ‘Advances in Exercise, Fitness, and Performance Genomics’2–5 series. However, most reported associations are cited in studies with small sample sizes without robust replication, and therefore are most likely type 1 errors. It is widely acknowledged that there will be many genes involved in physical performance phenotypes, and hence it is timely that genetic research has moved to the genomics era, that is, the simultaneous testing of multiple genes is now possible. New approaches involving large, well-funded consortia and utilising well-phenotyped large cohorts and genome-wide technologies will be necessary for meaningful progress to be made. This review summarises the most recent and significant findings from sports genetics and explores future trends and possibilities.

## Study designs, strategies and methodologies

### Twin and family studies

Similar to other areas of research, family or twin studies were initially the main focus investigating the genetic basis of human performance. The initial studies in the 1970s assessed indirectly the genetic basis of human performance using twin models and comparing the intra-pair variation between monozygotic (MZ) and dizygotic (DZ) twins, a concept referred to as the heritability estimate (h2), which reflects the population variance in a trait attributable to genetic factors (assuming a simple additive model of heredity) and is calculated by dividing the difference of the variance between DZ and MZ twins by the variance of DZ twins. When this approach was applied to maximal oxygen consumption ( max) in 25 pairs of twins (15 MZ and 10 DZ preadolescent boys), high heritability estimates were reported (eg, h2=93.4%).6 In other words, genetics could explain as much as 93.4% of the phenotypic variation in max. Similarly, high heritability estimates were reported in 15 MZ and 16 DZ twins of both genders (h2=96.5%)7 for the variation in skeletal muscle fibre composition. Genetic influences on other performance-related attributes such as body composition and motor activities (eg, walking, running, throwing, balancing) as well as training-induced improvements in max were also reported using similar methods.8–12 A more contemporary view based on results from the HERITAGE Family Study is that genetic factors can explain ∼50% of max when adjusted for age, body mass and body composition as covariates.13 Notably, in a study of 4488 adult British female twins, the heritability of athlete status was estimated to be at 66%.14 Given these exceptionally high heritability estimates, this concept has received considerable criticism with arguments that the high heritability estimates are related to low twin numbers and the near identical social environment of the studied twins.15 ,16 Recent studies also report high heritability estimates for neuromuscular performance and body composition.17–19

Despite the suggestion of significant heritable components for a range of performance-related traits, family-based studies do not offer insight into the specific genetic variation underlying these heritable components. The limitations and criticisms of the early indirect methods required the focus to be shifted to the continuously developing molecular-based laboratory methods to test directly the interaction between genetic and environmental factors, not only in family or twin studies but also in populations of interest for complex traits; for example, elite athletic status, where interindividual phenotypic variations are caused by a heterogeneous, polygenic model with multiple gene variants involved and interacting with environmental factors.1 ,20 ,21

### Genome-wide association studies: hypothesis-free approach

A number of different methodological approaches within the field of genetic epidemiology have been utilised to unravel the genetic basis of elite human performance. Owing to the development of more advanced gene discovery techniques, genetic studies are no longer restricted to family/twin studies but expanded to include the assessment of genetic variants (ie, mostly SNPs) within a population of interest. Population-based case-control studies are being used extensively at present, and can be further differentiated into hypothesis-free (sometimes referred to as a ‘fishing trip’, ie, no assumptions made about the genomic location of associated variants) and the more commonly used hypothesis-driven approaches, where the search for association may be restricted to particular genes of interest.

Advances in molecular technologies have enabled researchers to apply genome-wide association (GWAS) approaches to the field. GWAS examines the ‘association of genetic variation with outcomes or phenotypes of interest by analysing 100 000 to several millions of SNPs across the entire genome without any previous hypotheses about potential mechanisms’. GWAS has been successful in identifying novel genetic variants for age-related macular degeneration,22 type 2 diabetes mellitus,23 the interleukin 23 pathway in Crohn’s disease24 and obesity-related traits.25 This promising approach is not without important limitations. For example, human height is a highly heritable quantitative trait (up to 90% of population variance)26–30 as well as stable and easy to measure, although one of the largest studies to date (n=183 727) identified at least 180 loci associated with adult height, but together these explained only 10% of the variation in height. This is in large part related to the small effect size of most of these genetic variants. Furthermore, genetic variants associated with most complex diseases do not show predictive utility.31 Thus, much of the heritability of complex traits is missing,32 and numerous explanations have been proposed to account for this missing heritability. There have been suggestions that common variants do explain up to 45% of the variance in height,33 but the small effect size of these variants may render these variants undetectable by common study designs.32 Despite several limitations, these studies confirm that GWAS is able to detect many loci that implicate biologically related genes and pathways.34 The occurrence of rare variants which are not captured by GWAS may partly explain this limited success in determining the genomics of adult height. Following GWAS, additional approaches, such as fine mapping and sequencing, may be used to find common SNPs with larger effect sizes than GWAS tagging SNPs or identify rarer variants across GWAS loci. The hypothesis-free GWAS design is the most popular of the current widespread approaches as it allows one to (1) detect smaller gene effects by narrowing down the genomic target region precisely with new chips; (2) maximise the amount of variation captured per SNP with a fixed set of markers and (3) reduce genotyping costs, which make this approach attractive.35 Other factors relating to the sample population (family history of traits, ethnically homogeneous populations and a sample size of at least several thousands) and differences in statistical approaches (eg, the conservative Bonferroni correction for multiple testing vs the non-conservative false discovery rate correction or the application of permutation testing approaches) need to be carefully considered to ensure successful application of the GWAS approach.36 GWAS of elite human athletic performance are ongoing,37–40 but there are no published papers to date.

### Candidate gene analysis: hypothesis-driven approach

The most extensively used candidate gene association study approach requires a prior hypothesis that particular genes of interest contain variants that may be associated with a trait or disease. Typically, variants in a gene or genes of interest are genotyped in cases and controls, or assessed for association(s) with quantitative trait(s). This approach is effective in detecting genetic variants with a small or modest influence on common disease or complex traits. Functional SNPs with tag SNPs (by use of linkage disequilibrium) which would cover the entire candidate gene have been used in many candidate gene association studies.35 However, in this approach, candidate genes ought to be selected if there is good evidence that (1) the proposed candidate gene is biologically relevant to the main phenotype/complex trait of interest (eg, physical performance/aerobic capacity, adiposity); (2) the variants of the candidate gene influence the overall function of the gene (eg, variation in physiological ACE inhibitors activity levels are linked to polymorphisms in the ACE gene—see section on ‘Genes and polymorphisms with reasonable replication’) and (3) the polymorphisms of the selected candidate gene are frequent enough in the population to allow meaningful statistical analysis (eg, typical allele frequencies for the I and D alleles of the ACE I/D polymorphism in a European population are ∼43% and 57%, respectively). When these criteria are not fulfilled and candidate genes are selected based primarily on the interest of the research group, this approach generates conflicting results with low statistical power and difficulty of being replicated in other populations, and thus low validity.41 In addition, the candidate gene approach has largely been implemented in studies with small participant numbers and often without robust replication, perhaps partly attributable to publication bias.

### Major study cohorts

The genotyping of athletes of the highest performance calibre such as world record holders, world champions and Olympians is desirable and may circumvent the need for very large athlete cohorts in order to discover performance-associated polymorphisms. The number of large genetic cohorts of world-class athletes from a variety of countries and sports with extensive physical performance phenotypes is limited. The following are the most significant elite athlete cohorts based on current publication outcomes.

#### Genathlete study

In the Genathlete study, a classical case–control study, the endurance of athletes with a high max was compared with that of control participants with a low to average max.42–44 Data were analysed using the candidate gene approach, which allowed the distribution of particular genetic variants with respect to the phenotype max in both groups to be assessed. As this type of assessment requires large participant numbers, this study was designed as a multicentre study. To exclude influences owing to a regionally different distribution of genetic variants, particular attention was paid to a comparable distribution of the regional origin of participants. Currently, this cohort involves more than 600 participants (∼300 athletes and ∼300 controls) and therefore constitutes one of the largest matched case–control studies in this field.43 ,44

#### Elite Russian athlete cohort

One of the largest studies of elite athletes involves elite Russian athletes from mixed athletic disciplines.45–47 In the most recent study, 998 male and 425 female Russian athletes of regional or national competitive standard were recruited from 24 different sports.47 Athletes were stratified into five groups according to event duration (very long-endurance, long-endurance and middle-endurance), mixed ‘anaerobic/aerobic’ activity group and power group (predominantly anaerobic energy production).

#### Elite East African athlete cohorts

The phenomenal success of athletes from Ethiopia and Kenya in endurance running events is well recognised. Middle-distance and long-distance runners from Ethiopia and Kenya hold over 90% of both the all-time world-records and the current top-10 positions in world event rankings.48 Moreover, these successful athletes come from localised ethnic subgroups within their respective countries.49 ,50 In order to investigate the East African running phenomenon, a first study50–52 involved 76 endurance runners from the Ethiopian junior-level and senior-level national athletics teams (12 women and 64 men), 315 controls from the general Ethiopian population (34 women and 281 men), 93 controls from the Arsi region of Ethiopia (13 women and 80 men), and 38 sprint and power event athletes from the Ethiopian national athletics team (20 women and 18 men). A similar approach was conducted in a study53 with 291 elite Kenyan endurance athletes (232 men) and 85 control participants (40 men). Seventy of the athletes (59 men) had competed internationally representing Kenya and achieved remarkable success.

#### Elite Jamaican and USA sprint cohorts

These cohorts are comprised of elite Jamaican and African-American athletes representing the highest level of sprinting performance and geographically matched controls. In the Jamaican cohort, 116 athletes (men=60 and women=56) and 311 control participants (throughout the whole island; men=156 and women=155) were recruited.54 A total of 71 and 35 athletes had participated in 100–200 m and 400 m sprint events, respectively; and 10 athletes were involved in the jump and throw events. These athletes can be further classified into national (n=28) and international athletes (n=88) who were competitive at the national level in Jamaica and the Caribbean or at major international competitions for Jamaica. Among the 88 international athletes, 46 had won medals at major international events or held world records in sprinting. In the African-American cohort, samples from 114 elite sprint athletes (men=62 and women=52) and 191 controls (throughout the USA; men=72 and women=119) were collected.54 Among these athletes, 48, 42 and 24 athletes participated in 100–200 m, 400 m and jump and throw events, respectively. Athletes can be subdivided into 28 national and 86 international athletes; 35 of these athletes had won medals at international games and/or broken sprint world records.

#### Elite Australian athlete cohort

Australia has provided valuable genetic information on elite sprinters and endurance performers. The cohort comprises 429 elite athletes from 14 different sports and 436 unrelated controls. A subgroup of 107 and 194 participants were classified as elite sprinters and endurance runners, respectively.55 This cohort was studied to postulate, for the first time, the ACTN3 gene as a strong candidate to influence elite athletic performance (to be discussed in the ‘Genes and polymorphisms with reasonable replication’ section).

#### Elite Japanese athlete cohort

Japanese athletes are successful in international competitions such as the Olympics, especially in endurance-oriented events such as the Marathon and swimming events. This cohort is comprised of 717 elite Japanese athletes and 814 controls. Athletes are either national (participants in national competitions) or international athletes (participants in the Olympic Games, World and Asian Championships), including several medallists at these international games and world record holders. This Japanese athlete cohort comprises 381 track and field athletes, 166 swimmers and 170 Olympians from various sports. This cohort was initially established in order to identify both nuclear and mitochondrial DNA polymorphisms/haplogroups associated with elite Japanese athlete status and performance-related traits.56–61

#### Elite European and Asian swim cohort

Two elite swim cohorts, comprising Caucasian and East Asian swimmers, respectively, have been established. The Caucasian cohort comprised 200 elite Caucasian swimmers from the European, Commonwealth, American and Russian subcohorts. Swimmers were categorised as short and middle distance (≤400 m, n=130) or long distance swimmers (>400 m, n=70). Caucasian swimmers were all highly competitive and of world-class status having represented their countries in international competitions. Caucasian controls were drawn from a previous published report.62 Elite Japanese (n=158) and Taiwanese (n=168) swimmers were recruited and classified as short distance (<200 m, n=166) and middle distance (200–400 m, n=160), and none of these Asian swimmers competed at a distance greater than 400 m. East Asian swimmers were world-class having also competed in international competitions such as the Olympics, World Championships and Asian Games, or were competitive in national competitions. Controls were pooled from general Japanese (n=649) and Taiwanese (n=603) populations, and were healthy adults of both sexes and not professionally connected with athletics/sport. Two candidate genes (ACE inhibitors and α-actinin-3 (ACTN3); see next section) have been studied to date in this cohort.63

#### Spanish cohort

Extensive researches have been conducted on Spanish male athletes, with the most representative cohort comprising endurance world-class athletes (n=100, including 50 Olympic-class endurance runners and 50 professional cyclists (most of whom are Tour de France finishers, including stage winners))64 ,65 and world-class rowers (n=54, lightweight category, most of whom are medallists in world championships).66 This cohort also includes the majority of all-time best Spanish judo male athletes (n=108),67 elite swimmers (n=88)68 and track and field elite power athletes (n=53).69

#### Elite Israeli cohort

This cohort is comprised of 74 endurance and 81 sprint/power male athletes, who are current and former track and field athletes, as well as 240 matched controls. Athletes were carefully selected and included only if their main events were the 10 000 m run or the marathon (endurance group); and only if their main events were the 100–200 m dash and long-jump (sprint/power group). According to their personal best, athletes were further divided into two subgroups—the elite-level (those who had represented Israel in track and field world championships or in the Olympic Games) and the national-level.

#### Chinese cohort

He et al70 ,71 have recently conducted research in a Chinese cohort (of Han origin) made up of the best endurance runners (from 5000 m to marathon) of this country (current total n=241, 118 men). An important novelty of research on this Chinese cohort is the replication of results in a different (Caucasian) group of athletes and especially the analysis of the functionality of the SNPs, which was found to be associated with elite endurance status (using a dual-luciferase reporter assay).70

### Genes and polymorphisms with reasonable replication

#### ACE inhibitors and the renin-angiotensin-aldosterone-system

One of the most widely studied candidate genes for athletic performance is the ACE inhibitors gene. ACE is a peptidase known to regulate blood pressure by catalysing the conversion of angiotensin I to the vasoconstrictor angiotensin II and also degrading the vasodilator bradykinin.72 Interindividual variation in physiological ACE activity levels has been linked to polymorphisms in the ACE gene. Notably, ACE insertion-deletion (I/D) (rs4340), in which ‘I’ refers to the presence (insertion) and ‘D’ to the absence (deletion) of a 287 bp sequence in an Alu sequence of intron 16 in the ACE gene at chromosome location 17q23, can account for up to 47% of ACE activity variance in participants (ie, Caucasians and Asians, not Africans) with an additive effect across the II, ID and DD genotypes.72 Regarding physical performance, ACE I/D genotypes have been associated with a wide range of phenotypes. ACE II participants show significantly higher muscle efficiency gains from training than DD individuals,73 as well as greater improvements in running economy, or ability to sustain submaximal pace with lower oxygen consumption.74 Additionally, the I-allele associates with muscular endurance gains from training,75 which may relate to higher type 1 (slow-twitch) muscle fibre preponderance in ACE II participants.76 In terms of overall sporting ability, the I-allele has been associated with superior performance in British mountaineers,75 South African triathletes,77 British distance runners78 and Australian rowers.79 In contrast, the D-allele has been associated with success in power-oriented sports such as short-distance swimming63 ,80 and sprinting.78 Notably, a recent study63 reported that the ACE D-allele was associated with short and middle distance swimmer status in Caucasian swimmers, whereas the ACE I-allele was found to be overrepresented in East Asian short distance swimmers. Although this finding might be explained by the different risk alleles being responsible for the associations in swimmers of different ethnicities, it requires to be further confirmed in future studies. Other inconsistencies in the literature regarding ACE findings also exist. For instance, the D-allele has been found to be both positively81 and negatively82 associated with max. A study of 230 elite Jamaican and American sprinters found no association of either allele with sprint athlete status.54 A cohort of 192 athletes of mixed Caucasian nationalities and endurance sporting disciplines did not exhibit I-allele frequencies, which were significantly different from geographically-matched controls, and nor did the I-allele frequency associate with max in these athletes.43 Several other studies involving Caucasian populations also found no association between the I-allele and elite physical performance,45 ,62 ,83 and an opposite finding (ie, D-allele associated with endurance performance) in Israeli84 and Korean85 cohorts. Despite the many inconsistencies in replication, the ACE gene remains as a candidate possibly influencing elite performance.

#### α-Actinin-3

α-Actinin-3 is an actin-binding protein and a key component of the sarcomeric Z-line in skeletal muscle. Expression of ACTN3 (at 11q13.1) is limited to type II (ie, fast, mostly glycolytic) muscle fibres which can generate more force at high velocity. Homozygosity for the common nonsense polymorphism R577X (rs1815739) in the ACTN3 gene results in deficiency of ACTN3 in a large proportion of the global population.86 Yang et al87 examined the R577X genotype frequencies in three African populations (Kenya, Nigeria and Ethiopia) in comparison with non-African populations (Europe, Asia and Australia). Extremely low 577XX genotype frequencies were observed in Kenyan and Nigerian athletes versus controls (1% vs 1% and 0% vs 0%, respectively), and they were much lower than in any other non-African populations, that is, frequency of the 577XX genotype of 18% in Australian Caucasians, 10% in Aboriginal Australians, 18% in Spanish Caucasians and 25% in Japanese). These results also implied that the ACTN3 deficiency was not a major influence on performance in African athletes. This polymorphism does not appear to result in pathology, although it could alter muscle function.88–92 Furthermore, a strong association has been reported between the ACTN3 R577X polymorphism and elite athletic performance in Caucasian populations.55 ,93–98

The 577XX genotype was found at a lower frequency in elite Australian sprint/power athletes relative to controls,55 and this finding was replicated in the Finnish,96 Greek,97 Israeli99 and Russian athletes.94 In particular, in a study of 429 elite white athletes from 14 different sporting disciplines and 436 controls, the sprint athlete group showed a higher frequency of the 577RR genotype (50%) and a lower frequency of the 577RX genotype (45%), compared with controls (30% and 52%, respectively), while the elite endurance athletes displayed a higher frequency of the 577XX genotype (24%) than controls (18%)55; however, the sample sizes in the truly elite subgroups are very small, and therefore, any conclusions drawn from them are prone to a high risk of type I error and should be treated with caution. Interestingly, MacArthur et al100 developed an exciting ACTN3 knockout (KO) mouse model in order to investigate the mechanisms underlying ACTN3 deficiency. These authors found that the KO mice had similar muscle fibre proportions as the wild type but reduced muscle mass, which appeared to be accounted for by the reduced fibre diameter of the fast-twitch muscle observed in KO mice.100 In addition to alterations in muscle fibre size, increased activity of muscle aerobic enzymes, longer muscle contracting time and shorter recovery period from fatigue were attributed to the characteristics of the ACTN3 KO mouse. Thus, the phenotypes of the ACTN3 KO mouse mimic the gene association studies performed in humans and provide a plausible explanation for the reduced sprint/power capacity and improved endurance performance in humans with the ACTN3 577XX genotype.

### Implications of current genetic findings in association with elite athlete status

World-class athletic performance is a complex multifactorial phenotype, and it is acknowledged that to become an elite athlete, a synergy of physiological, behavioural and other environmental factors is required. It is commonly perceived that genetic endowment is one of the arbiters of elite athletic performance, a belief perhaps augmented by the striking geographical variation in athletic success.49 ,50 ,101 As reviewed above, a number of genes have been found to associate with elite performance. These studies have employed primarily the candidate gene approach to identify those genes which are associated either with elite performance or with variation in performance-related traits. As such, a number of genes have been found to associate with elite performance, although generally with small effect sizes and heavily prone to type I statistic error. The number of candidate genetic variants that can potentially explain elite athletic status will be much higher than those examined by numerous biotechnology companies such as Sports X Factor (eg, 7 genes: http://www.sportsxfactor.com). While genetic testing will very likely become a part of talent ID programmes in the future, current genetic testing is of almost zero predictive capacity despite testimonials to the contrary (www.xrgenomics.com/testimonials). Whether new approaches such as GWAS will significantly improve prediction outcomes for athletes is unknown.

### The future

Most of the knowledge in sports genetics (including most of the information presented in this review) has been generated primarily using classical/old-fashioned genetic methods such as candidate gene analysis and almost exclusively applied to cohorts with small sample sizes (usually n≤300) and rather unsophisticated multifactorial phenotypes (eg, aerobic capacity and athlete status). The data thus generated from these studies and reviewed here need to be examined in the light of the view held by most ‘hard-core’ geneticists that a study of any complex phenotype in humans is futile unless a cohort size of between 20 000 and 100 000 is used and therefore possessing sufficient statistical power for meaningful analysis and interpretation. If one accepts this view (not currently held by the authors of this review), then all the studies reviewed here should be ignored. While this view is somewhat extreme, an intermediate view (currently held by the authors of this review) is that, perhaps beside the ACTN3 R577X and possibly ACE I/D, the vast majority of the candidate genes for sporting performance discovered to dateare not the key candidates seriously implicated in the phenotypes of interest. Priority should therefore be given to recruiting sufficiently large study cohorts with adequately measured phenotypes to increase statistical power. Some of the elite athlete cohorts described in this review may suffice, and collectively, these cohorts could be used for replication purposes.

As stated previously, it is accepted that there will be many genes involved in sporting performance, and hence it is timely that genetic research has moved to the genomics era. New approaches and technologies will no doubt be increasingly applied to searching the whole human genome instead of studying single genes or indeed SNPs as the cost of using such whole-genome methods becomes more affordable. In particular, the cost of large-scale sequencing has dramatically dropped, from the first complete human genome costing $3 billion to sequence in 2000 to$1000 per genome, as promised by the company Ion Torrent (a division of Life Technologies) using its new Ion Proton sequencer in 2012.102 At present, no matter the success or failure of the GWAS approach, this approach is certainly providing, and will continue to provide, the insight into genetic architecture and the molecular basis underlying human diseases and complex traits. The first genome-wide association study in age-related macular degeneration (AMD) revealed an intronic and common variant significantly related to AMD by comparing 96 cases with 50 controls, and consequently a functional polymorphism in the Complement Factor H (CFH) gene was identified by resequencing,22 suggesting that it is not unreasonable to expect and detect variants with large effects in a small study; however, large cohorts (ie, ranging from several thousands to 20 000–100 000) will be routinely studied by GWAS and will provide good resources for all scientific fields including genomics of the world-class athlete.103 This development will require a move away from the traditional way of researching in exercise science/medicine (ie, predominantly single-laboratory studies) to large, well-funded collaborations/consortia with leading industry partners and therefore substantial statistical/technological power and know-how. Only with such resources can the most strongly acting genes be identified with confidence, enabling gene×gene interactions to be revealed and gene×environment interactions to be studied more accurately. One first example in the area of sports performance has recently been successfully piloted.104 The overall purpose was to identify new SNPs that confer susceptibility to sprint and endurance performance by the use of world-class athletes as participants. GWAS was initially performed using the Illumina HumanOmni1-Quad BeadChip (>1 000 000 SNPs/sample) or the HumanOmniExpress BeadChip (>700 000SNPs/sample) in 95 sprinters and 102 controls from Jamaica. After removing individuals and markers failing quality control, the remaining SNPs were taken forward for association analysis. The genotype frequencies of 88 Jamaican sprinters and 87 Jamaican controls were compared using logistic regression (corrected for population stratification), assuming an additive model. Seventeen SNPs crossed a predetermined significance threshold of 5×10–5.40 Further validation of these signals in independent cohorts is underway, and the replicated SNPs will be taken forward for fine-mapping and functional studies to uncover the underlying biological mechanisms. Further analyses using other cohorts, such as the ones described in this review, will also provide opportunities for verifying these GWAS findings across different ethnicities.

### What are the new findings?

• Research has shifted from twin-based/family-based studies to the study of single nucleotide polymorphisms (SNPs) in populations.

• Over 200 SNPs associated with physical performance have been reported.

• Historically, genomics research has been hampered by small sample sizes.

• Candidate gene analysis is the most commonly used approach, and it is effective in detecting genetic variants with a small or modest influence.

• Genome-wide association approaches examine the association of genetic variation across a large number of SNPs simultaneously.

• The number of large genetic cohorts of world-class athletes is limited.

• With larger samples, genome-wide association would allow the detection of smaller gene effects and maximise the amount of variation captured.

• Current genetic testing has zero predictive power on talent identification and should not be used by athletes, coaches or parents.

### How might it impact on clinical practice?

• Genetic markers of sports injuries (eg, tendinopathy) are being discovered and may be used in the future in conjunction with other health indices to provide personalised care for an athlete.

• Genetic variants influencing elite athletic performance are also expected to impact on cardiac, skeletal muscle and energy metabolism.

• Genomic data may eventually help to prevent, diagnose and treat diseases such as myocardial dysfunction and muscular-skeletal diseases, and to determine whether or not to tailor prevention and treatments to specific populations.

View Abstract

## Footnotes

• Competing interests None.

• Provenance and peer review Commissioned; internally peer reviewed.

• ▸ References to this paper are available online at http://bjsm.bmj.com


text:
# Proof in Hungerford about natural isomorphisms of multifunctors

Reading Hungerford's Algebra I encountered the following exercise:

(A) Let $\mathcal{C}$ and $\mathcal{D}$ be categories. Let $S,T: \mathcal{C} \to \mathcal{D}$ be covariant functors. If $\alpha: S \Longrightarrow T$ is a natural isomorphism, then there exists a natural isomorphism $\beta: T \Longrightarrow S$ such that $\alpha \circ \beta = \operatorname{id}_T$ and $\beta \circ \alpha = \operatorname{id}_{S}$ where $\operatorname{id}_{T,S}$ are the identity natural isomorphisms.

(B) Generalize the above statement to multifunctors (functors with product category as domain).

Note that Hungerford defines a category as being locally small. For (A), I present the following proof:

By hypothesis $\alpha_X: S(X) \to T(X)$ is an equivalence for each $X \in \operatorname{ob}(\mathcal{C})$. Hence for each component $\alpha_X$ there exists a unique morphism $\beta_X \in \hom_{\mathcal{D}}(T(X),S(X))$ such that $\alpha_X \circ \beta_X = \varepsilon_{T(X)}$ and $\beta_X \circ \alpha_X = \varepsilon_{S(X)}$.

Now define $\beta = \{\beta_X\}_{X \in \operatorname{ob}(\mathcal{C})}$. It is claimed that this is a natural isomorphism. By hypothesis $\alpha: S \Longrightarrow T$ is a natural isomorphism, and hence \begin{align*} Sf \circ \beta_X &= \varepsilon_{S(Y)} \circ Sf \circ \beta_X \\ &= (\beta_Y \circ \alpha_Y) \circ Sf \circ \beta_X\\ &= \beta_Y \circ (\alpha_Y \circ Sf) \circ \beta_X\\ &= \beta_Y \circ (Tf \circ \alpha_X) \circ \beta_X\\ &= \beta_Y \circ Tf \circ (\alpha_X \circ \beta_X)\\ &= \beta_Y \circ Tf \circ (\varepsilon_{T(X)})\\ &= \beta_Y \circ Tf \end{align*} giving commutativity; that each $\beta_X$ is an equivalence follows by hypothesis. Finally, observe that for each object $X \in \operatorname{ob}(\mathcal{C})$, \begin{equation*} (\alpha \circ \beta)_X = \alpha_X \circ \beta_X = \varepsilon_{T(X)} \implies \alpha \circ \beta = \operatorname{id}_T \end{equation*} and symmetrically $\beta \circ \alpha = \operatorname{id}_S$.

My question is why does this not hold identically for multifunctors, simply taking $\mathcal{C}$ to be the relevant product category?

-
It seems to me that B is a special case of A where we set $\mathcal{C}=\mathcal{E}^n$. – Baby Dragon Jul 26 '13 at 0:28
It does hold for multifuntors too. The author just wants you to write down the (more general) equations in this case. I would replace "equivalence" with "isomorphism" in your text and perhaps use the more common id in place of $\varepsilon$ . – magma Jul 26 '13 at 8:18
I mean strictly speaking the first statement does imply the second. I am wondering however if this is just an authorial oversight or if there is some sort of pedagogical content I could be missing involved in considering the special case. – Cameron Jul 26 '13 at 23:25
Cameron, you are right, B is a special case of A. But Hungerford already doesn't gives the best definition of a natural isomorphism (actually A is the correct one, and what Hungerford gives, should be called a natural transformation which is a pointwise isomorphism, which turns out to be a characterization of natural isomorphisms). Many books ignore forgetful functors as if they don't play any role ... – Martin Brandenburg Aug 5 '13 at 18:24

format: plain


text:
# CSC : error CS1703: Multiple assemblies with equivalent identity have been imported (iOS)

I recently encountered a problem compiling my Xamarin.Forms iOS project. Everything worked well when testing the UWP App during development, but when I tried to test the iOS project, the compiler threw the following error:

CSC : error CS1703: Multiple assemblies with equivalent identity have been imported (iOS)'[..]\packages\system.reflection.emit\4.3.0\ref\netstandard1.1\System.Reflection.Emit.dll’ and ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.Reflection.Emit.dll’. Remove one of the duplicate references.

Checking those two files mentioned, you’ll find out, that those have two different versions (nuget cache: 4.3.0, VisualStudio: 4.0.0), also the path (and file size) states, that the file from the VisualStudio folder is only a facade.

The solution is quite simple, just add a package reference to your project-file excluding all assets:

<PackageReference Include="System.Reflection.Emit" Version="4.3.0">
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>

.. just add it in an ItemGroup block with other package references and you solved that issue.

# read and write properties on dynamic objects in .NET/C#

Ok, the headline sounds a little bit funny, because first of all, dynamic objects have no properties. Also you can not use reflection on a dynamic type, because it’s dynamic. What I actually want to do, is to access values of a dynamic object by its name – but I don’t know the name of the property on compile time, but during execution.

I want to do something like that:

dynamic obj = GetDynamicObject();
string myPropertyValue = DynamicExtension.GetValue(obj, "MyProperty");
DynamicExtension.SetValue(obj, "MyProperty", "some cool value");

So how can we do this? Reflection is not possible, and not all dynamic types impement IDictionary like ExpandoObject.

But how can we achieve this? By looking at the disassembled code, of a dynamic class, and the way it is accessed, we can find out, how we can access it ourself…

dynamic dynObj = new TestClass
{
TestProperty = "Hello World",
TestInt = 20
};
var val = dynObj.TestProperty;
dynObj.TestProperty = "Hello C#";

Because I don’t want to flood this post, I just copied the essentials from the IL. Basically there are 2 parts:
1. create a Binder
2. create a CallSite to execute the getter/setter.

// the getter
var binder = Binder.GetMember(
CSharpBinderFlags.None,
"TestProperty",
typeof(object),
new CSharpArgumentInfo[] {

CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.NamedArgument, null)
});

var getter = CallSite<Func<CallSite,object,object>>.Create(binder);
var val = getter.Target(getter,  dynObj);

// the setter
var setterBinder = Binder.SetMember(
CSharpBinderFlags.None,
"TestProperty",
typeof(object),
new CSharpArgumentInfo[] {
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null),
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) });
// the IL actually uses string as value type, but we use object here, to be more flexible
var setter = CallSite<Func<CallSite,object,object,object>>.Create(setterBinder);
setter.Target(setter, dynObj, "Hello C#");

So now just wrap it up to our two functions:

    public static class DynamicHelper
{
public static object GetValue(object obj, string name)
{
var binder = Binder.GetMember(
CSharpBinderFlags.None,
name,
typeof(object),
new CSharpArgumentInfo[] {
CSharpArgumentInfo.Create(
CSharpArgumentInfoFlags.NamedArgument,
null)
});

var getter = CallSite<Func<CallSite,object,object>>.Create(binder);
return getter.Target(getter, obj);
}

public static void SetValue(object obj, string name, object value)
{
var setterBinder = Binder.SetMember(
CSharpBinderFlags.None,
name,
typeof(object),
new CSharpArgumentInfo[] {
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null),
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null) });
// the IL actually uses string as value type, but we use object here, to be more dynamic
var setter = CallSite<Func<CallSite,object,object,object>>.Create(setterBinder);
setter.Target(setter, obj, value);
}
}

# Arduino Object-oriented

It has been more than a decade, that I switched over to programming in C# and even longer I am developing object-oriented code. But when it comes to Arduino, I can not count on C#. (Actually, there is an Arduino-like microcontroller, which can be programmed with C#. It is called Netduino) But we can still produce object-oriented code with Arduino.

Let’s first have a look at a simple Blink-App (from the Arduino tutorial).

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

As you can see, there are two standard functions, that get called, when the code is deployed on the device. setup() when the device starts, and loop(), which is something like a while(true)-loop after the setup finished. The code does that, what it is meant to do, make a LED blink every second. But let’s assume we have a button, that shall turn the blinking on and off. My OOP-brain always keeps saying:

“There should be a LED-object and a Button-object”

I can imagine, that there are other solutions, but that was the first thing, that comes in mind when I think about it. So let’s draw something…

When we now come to the point to include those objects in the Standard setup-loop-pattern, we also need a loop and setup-function in each of the classes. These could be called from the main functions.

Here comes the code:

enum SwitchState
{
On,
Off
};
//---------- Light
class Light
{
SwitchState _currentState = Off;
byte _pin;

public:
Light(byte pin)
{
_pin = pin;
}
SwitchState GetCurrentState()
{
return _currentState;
}
// turns on the light
void TurnOn()
{
_currentState = On;
}

// turns off the light
void TurnOff()
{
_currentState = Off;
}

void Setup()
{
pinMode(_pin, OUTPUT);
}

void Loop()
{
if (_currentState == On)
{
digitalWrite(_pin, HIGH);
}
else
{
digitalWrite(_pin, LOW);
}
}
};
//---------- Button
class Button
{
SwitchState _currentState = Off;
byte _pin;

void OnSwitchChanged()
{
SwitchChangedEvent();
}

public:
void(* SwitchChangedEvent)();

Button(byte pin)
{
_pin = pin;
}

SwitchState GetCurrentState()
{
return _currentState;
}

void Setup()
{
pinMode(_pin, INPUT);
}

void Loop()
{
if (val == HIGH && _currentState == Off)
{
_currentState = On;
OnSwitchChanged();
}
else if (val == LOW && _currentState == On)
{
_currentState = Off;
OnSwitchChanged();
}
}
};

//-------------------------- MAIN
Light led1(1);
Button button1(2);

void InvertLight()
{
if (led1.GetCurrentState()==Off)
{
led1.TurnOn();
}
else
{
led1.TurnOff();
}
}

void setup() {
led1.Setup();
button1.Setup();
button1.SwitchChangedEvent = InvertLight;
}

void loop() {
led1.Loop();
button1.Loop();
}

From this starting point, you can do a lot of fancy stuff. First of all, you could implement a base class, to actually wrap up those functions, that tend to produce code doubles. Also you may not want to trigger (and write) the digital pins on every loop. You can simply introduce something like a timestamp, skipping the loop for an amount of time. Everything can be made in a base class, so there will be no need to implement it every time again.


text:
# Lower Bound to Measure Entanglement in Mixed States

Given a mixed state with a $$n$$ qubit density matrix of the following structure: $$\rho=\pmatrix{\lambda_1&&&&\nu\\&\lambda_2\\ &&\lambda_{\dots}\\ &&&\lambda_2\\ \nu&&&&\lambda_1},$$ so a mixture of a GHZ state and a sum of diagonal contributions of the form: $$\prod Z_k^{x_k}$$, where $$x_k$$ is the $$k$$th bit of the binary number $$x\in\{0,1\}^n$$, which is restricted to contain an even number of $$1$$s. The latter restriction ensures that the matrix is symmetric w.r.t. the anti-diagonal.

If all $$\lambda_k$$ are equal, there is a way to measure exponentially small amounts of the GHZ state, as proposed here. It looks to me, that my states don't respect the graph diagonal state requirement given in the comments.

What is the best lower bound for $$\nu$$, that is efficiently measurable (involving polynomially many measurements)?

As soon as you impose that $$\lambda_x=\lambda_{\bar x}$$, your state is of the form that my previous results apply to. This is because you can write $$|x\rangle\langle x|+|\bar x\rangle\langle\bar x|=\frac{1}{2}(|x\rangle+|\bar x\rangle)(\langle x|+\langle\bar x|)+\frac{1}{2}(|x\rangle-|\bar x\rangle)(\langle x|-\langle\bar x|),$$ and so this state is diagonal in the GHZ-state basis. This is easily rotated into the graph state basis of a star graph using Hadamards.
Let $$y\in\{0,1\}^n$$ be the choice that gives the largest value of $$\lambda_y$$ ($$y\neq 000\ldots 0$$ or $$111\ldots 1$$). Choose $$y$$ to specify your bipartition of the qubits. This is entangled when $$\lambda_y<\nu$$.
• thanks. When I apply $H\otimes H$ to $ZZ$, I get $XX$. To be diagonal in the star graph state bases, this should commute with all $K_y$. But for the latter I get $11,XZ,ZX,YY$. Looks like I got something wrong, right? Jul 22 '20 at 6:49
• The stabilizers for the GHZ states are $\{Z_iZ_{i+1}\}_{i=1}^{n-1}$ and $X^{\otimes n}$. If you apply Hadamards to all but the first qubit, you get $Z_1X_2$, $\{X_iX_{i+1}\}_{i=2}^{n-1}$ and $X_1Z_2Z_3\ldots Z_n$. These do commute with the stabilizer generators, which are $\{Z_1X_i\}_{i=2}^n$ and $X_1Z_2Z_3\ldots Z_n$ Jul 22 '20 at 8:15
• The way that I see this is that I use the graph state stabilizers to construct the stabilizers that I want. For example, $X_iX_{i+1}$ can be written as $(Z_1X_i)(Z_1X_{i+1})$. Jul 22 '20 at 8:19


text:
# If $\ell_1$ embeds into $X$ a separable Banach space, can $X^*$ be separable?

First let's defined embedding: $Y$ embeds into $X$, where $X$ and $Y$ are normed spaces, if there exists a 1-to-1 linear map from $Y$ into $X$ that is bicontinuous.

Suppose that $\ell_1$ embeds into a separable Banach space $X$. Clearly $X$ cannot be reflexive since every closed subspace of a reflexive space must be reflexive. However, can the dual $X^*$ of $X$ still be separable?

• Have you considered the dual of the embedding operator? – user21467 Apr 27 '15 at 2:01
• I guess if $T$ is the embedding you mean the dual of $T(\ell_1)$. That would indeed be isomorphic to $\ell_\infty$ and so not separable but that is as much as I know. – Anguepa Apr 27 '15 at 2:49
• No, I mean the dual of $T$, namely $T^\ast\colon X^\ast\to\ell_\infty$. – user21467 Apr 27 '15 at 3:55
• Oh the adjoint. No i haven't, wouldn't know how to use it. – Anguepa Apr 27 '15 at 12:54
• Since $T$ is an embedding, it is injective and has closed range. What does that tell you about $T^\ast$? – Daniel Fischer Apr 27 '15 at 12:58

Sketch: Show that $T^\ast\colon X^\ast\to\ell_\infty$ is surjective (and continuous). Show also that the continuous image of a separable space is separable. Conclude that $X^\ast$ is not separable.


text:
# Moving average filter magnitude attenuation

I am dealing with a moving average filter which filters power system signals to rid them of noise or harmonics etc. The fundamental or useful component of these signals is centered around 50 Hz or 60 Hz. The magnitude response of the filter at an angular frequency say as per some standard papers is given as $$|H(e^{(j\omega_1)})|=|\frac{\sin(L_m \omega_1 /2)}{L_m \sin(\omega_1/2)}|$$ , where $$L_m$$ is the window length of the filter and the value of $$\omega_1=\frac{2\pi f_f}{F_s L_m}$$ . Sampling frequency is given by $$F_s$$ whereas the input signal frequency to the filter is given by $$f_f$$ . The idea is when the filter input signal frequency is equal to the fundamental (no noise or harmonics etc) or even close to it (say 59.5 Hz or 59.7 Hz considering a 60 Hz system) the magnitude response (gain) of the above mentioned filter should be equal to one or close to it for any sensibly chosen value of the window length and the sampling frequency. For example if i choose a value of $$L_m$$=31 and and consider the input signal frequency $$f_f$$ to be 59 Hz, with a sampling frequency $$F_s$$ of say 1440 Hz, i end of up with a gain of 0.9972, then if i use $$f_f$$=58, i end up with a gain of 0.9973, similarly along the lines, for $$f_f$$ equal to 50 Hz i get a gain of 0.9980, showing that gain increases as frequency deviates from the nominal (which does not make any sense). I am having a hard time understanding this, could you clear this confusion for me. Could you show me how the gain is close to unity for small frequency deviations from the nominal

• Maybe a bandpass filter would be better, and even if you want a lowpass, then a moving average is, most probably, the worst choice. Unless you're dealing with filtering of powers (p-q theory & co), when you actually need a lowpass with the lowest latency possible. – a concerned citizen Apr 10 at 10:15
• Bandpass is not and option plus, lowpass via simple averaging is what i am trying here. – mka_07 Apr 10 at 10:21
• Why is bandpass not an option? That sounds like exactly what you need and the implementation as an 2nd order IIR is quite simple; would you consider it? See this post here on implementation of that dsp.stackexchange.com/questions/40482/… – Dan Boschen Apr 10 at 12:34
• This seems very much like an xy problem. Can you elaborate on what you actually need to do? To me it sounds like you need to preserve the fundamental, and that's a bandpass. Do you also need DC? If not, again bandpass. If you do, then I have to wonder what good is all this for, to keep both DC and mains fundamental? – a concerned citizen Apr 10 at 17:16

Here is the plot of $$|H(e^{j\omega})|=|\frac{\sin(L_m\omega_1/2)}{L_m\sin(\omega_1/2)}|$$ for $$f_f$$ varying from $$-Fs/2:1:F_s/2-1$$ (steps of 1Hz).

If you want to filter out 50 or 60Hz, you need to have the gain to be zero around these digital frequencies of $$2\pi 50/F_s$$ or $$2\pi 60/F_s$$. I think the mistake is that there is $$L_m$$ in computation $$\omega_1$$. $$\omega_1$$ is just normalized frequency $$2\pi f_f/F_s$$. If I remove $$L_m$$, I can see zeros in the gain function. Adjust $$L_m$$ such that zeros fall in corresponding position of 50Hz or 60Hz which you want to filter.

In order to center the frequency response over the nominal frequency $$f_f$$, need to shift the frequency response by $$\omega_s = 2\pi f_f/Fs$$. That is, apply phase shift of $$h_1[n] = h[n]e^{-j\omega_s n}$$.

EDIT: Frequency response of $$L_m$$ moving average filter $$H(e^{j\omega}) = \frac{1}{L_m}\sum_0^{L_m-1}e^{-j\omega n}\\ = \frac{1}{L_m}\frac{1-e^{-j\omega L_m}}{1-e^{-j\omega}}\\ = \frac{1}{L_m}\frac{e^{-j\omega L_m/2}}{e^{-j\omega /2}}\frac{\sin(\omega L_m/2)}{\sin(\omega /2)}\\ |H(e^{j\omega})| = |\frac{\sin(\omega L_m/2)}{L_m\sin(\omega /2)}|$$

• Thanks for the time and effort, but i think you misunderstood my question. I am using input signals whose fundamental component is centered around 50 or 60 Hz, and i am passing them through my averaging filter as given above to remove any noise or harmonics present. I am not supposed to filter out my 50 Hz or 60 Hz component, i am supposed to retain it (you have mentioned that gain around these frequencies should be zero). – mka_07 Apr 10 at 10:07
• In that case you can shift the moving average frequency response so that it centers around 50/60Hz and not 0Hz. You can apply the corresponding phase correction in time domain of the filter. If that is the solution you want, shall I modify the answer? – jithin Apr 10 at 10:20
• Are you able to relate to my confusion regarding the increase of gain with deviation of frequency from the nominal or center frequency. Even the removal of the Lm term from the omega equation does not help with the erroneous gain that i am getting. – mka_07 Apr 10 at 10:28
• You will get highest value of 1 when the $L_m$ contains integer number of time periods of signal at 50Hz. Otherwise, the gain will be less than 1. Also, it depends on the floating point resolution of the program you are using. In MATLAB you can make it double format so that instead of 0.9972 you will see 0.9969393920 something. – jithin Apr 10 at 10:40
• Hear me out once, in case i follow your idea of omitting out Lm from the omega1 equation and use the frequency deviation from the nominal (instead of the direct frequency ff) for calculating omega1, the values of H i get make sense and decrease as the frequency deviation increases. Does that make sense. – mka_07 Apr 10 at 10:52

Question : How is the gain close to unity in the vicinity of 60Hz?

Answer : It's not. Your $$\omega_1$$ mapping is not correct. Digital frequency $$\omega \in [-\pi, \pi]$$ in a filter response $$H(e^{j\omega})$$ is mapped to continuous frequency as follows :$$f = \frac{\omega}{\pi} .\frac{f_s}{2}$$ $$\omega \in [-\pi, \pi] \rightarrow [-\frac{f_s}{2}, \frac{f_s}{2}]$$.

A Moving Average filter is a causal Low-Pass filter of which the cut-off frequency($$\omega$$) depends on $$L_m$$.

Intuition : It averages $$L_m$$ number of input samples, i.e. average of 1 current sample $$x[n]$$ and $$L_m - 1$$ past input samples. Averaging smoothens out variations from the input samples because the consecutive samples of output are changing very slowly. Why? Because, the variation in output sample can only be caused by the current input sample $$x[n]$$ which is small compared to sum of $$L_m - 1$$ past input samples. so, a large part of consecutive output samples remain approximately same. Hence, Moving average is a LPF and that is why useful to filter out noise with low computational complexity.

Now, since you have $$|H(e^{j\omega})|$$, so you can plot it against frequency and see where your desired band of 55Hz to 65Hz lies inside the Moving Average Filter response.

Figure 1 : Frequency response of the filter you have mentioned $$L_m=30$$, $$F_s = 1440Hz$$ and grey patch shows where the band 55Hz to 65Hz lies. It actually lies in the side lobe of MA response.

Figure 2 : Zoomed in Frequency response of the filter you have mentioned $$L_m=30$$, $$F_s = 1440Hz$$ and the patch shows where the band 55Hz to 65Hz lies.

You need to bring your interested band containing frequency from 55Hz to 65Hz inside the main Lobe and close to DC to get a less distorted 60Hz sinusoidal signal.

You can do 2 things to achieve your goal :

1. Decrease $$L_m$$ so that cut-off frequency of Moving Average(MA) filter moves away from DC and 60Hz sinusoid falls inside main lobe.

2. Increase sampling frequency $$f_s$$, so that input signal spectrum shrinks and as a result 60Hz comes inside the main and close to DC.

Option 1 : Decrease Filter length, $$L_m = 10$$, and $$F_s = 1440Hz$$

Option 2: Increase Sampling rate, $$L_m = 30$$, and $$F_s = 30*1440Hz$$

As you can see that the effect both methods is that 60Hz now falls inside Main Lobe and hence you will retain you r desired signal of 60Hz. But the 2 options are not same and $$2^{nd}$$ option of increasing sampling rate while keeping $$L_m = 31$$ will perform way better than decreasing $$L_m$$ to 10. Why?

Two main reasons:

1. Decreasing $$L_m$$ to a lower value will not have as good denoising effect as a higher $$L_m$$, since the averaging is done over a shorter length.

2. Increasing sampling rate and then low-pass filtering your spectrum will inherently increase SNR. You can think about how!

A moving average filter is a type of low pass filter with unity gain at DC. The cutoff frequency at which attenuation starts to occur in an appreciable way is a function of the length of the average, such that longer lengths result in a lower cutoff frequency. Your magnitude values are close to unity because the frequencies are small relative to the cutoff frequency.


text:
# Finding Interatomic Spacing

Here is the problem I am working on

For what temperatures are the atoms in an ideal gas at pressure P quantum mechanical ? Hint: use the ideal gas law P V = N kT to deduce the interatomic spacing (the answer is $T < (1/k)(h^2/3m)^{3/5} P^{2/5})$. Obviously we want m to be as small as possible and P as large as possible for the gas to show quantum behavior. Put in numbers for helium at atmospheric pressure. Is hydrogen in outer space (interatomic distance ≈ 1 cm and temperature ≈ 3K) quantum mechanical?

According to the answer key, to find the interatomic spacing, we need to find the size of a single gas particle. One gas particle corresponds to N=1, and the volume is V = d^3. This leads to

$d = \left( \frac{kT}{P} \right)^{1/3}$

I have two objections to this, for which I hope you provide correction. Firstly, assigning the volume V=d3 implies that we are assuming that the atoms are square? Secondly, how does finding the size of a single gas particle provide us with the interatomic spacing. It would seem that the most we could deduce from such information is, that closest two gas particles could get. Are we to assume that the gas particles are this closely packed? Wouldn't the gas solidify at this point?

The idea of the question is to find the temperature at which the average interparticle spacing is equal to the average de Broglie wavelength. Both of these are averages because the atoms of the ideal gas are not evenly spaced and the velocity (and therefore de Broglie wavelength) of the ideal gas atoms follows the Maxwell-Boltzmann distribution. So this is going to be a very rough calculation.

Given how rough the calculation is, the approximation that the gas atoms are on average equally spaced seems a reasonable one. In that case our $N$ atoms are distributed in a volume $V$, so the average spacing $d$ is:

\begin{align} d &= \left( \frac{V}{N} \right)^{1/3} \\ &= \left( \frac{\frac{NkT}{P}}{N} \right)^{1/3} \\ &= \left( \frac{kT}{P} \right)^{1/3} \end{align}

"The size of a single gas particle" is a bad term for what you calculate. A better term would be:

"The volume one of the gas particles would occupy, if the total volume were distributed equally among all gas particles"

And this translates loosely to "The volume, in which you find one gas particle on average"

If you then imagine every particle sitting at the centre of their volumes, then two neighbouring particles have indeed the distance $d$. This whole argument is not rigorous, but rather heuristic.


text:
# GPS

The GPS module receives the position (longitude/latitude/altitude) of the senseBox. This can be used for mobile applications, e.g. mobile data transfer to the openSenseMap. This sensor is compatible with all common GNS systems (GPS, QZSS, GLONASS, BeiDou, Galileo) and is based on the u-blox CAM-M8Q Multi GNSS module.

## Setup

In order for the GPS module to have a signal throughout the entire measurement period and thus be able to request the location, you must ensure that the module is not covered by anything. Ideally, you should install it outside the housing for the measurement period.

For the power supply during the measurement period you can use a power bank. Some Powerbanks switch themselves off, too little power is drawn (e.g. when a mobile phone is fully charged), so it can happen that the Powerbank does not permanently supply the senseBoxMCU with power. Before measuring, make sure that this is not the case. The GPS sensor is connected to the I2C ports.

It may take a while for the GPS sensor to start receiving correct signals. This process can take up to 15 minutes, especially if you are using it for the first time. After a network has been detected, the information is stored internally in the sensor so that it can go faster with the next use!

## Programming

Make sure you have the latest board support package installed, as you need the correct software libraries. How this works was explained to you in step 2.

How the GPS module is programmed is illustrated here using a temperature measurement as an example. Each measured value of a mobile station is uploaded together with the corresponding values for latitude and longitude.

The first step is to create an instance of the sensors. Additionally we define 2 variables for latitude and longitude.

#include "SenseBoxMCU.h"
HDC1080 hdc;

GPS gps;
float lat; // Geographical latitude
float lon; // Geographical longitude

In the setup function we now start the two sensors.

setup() Function
void setup(){
hdc.begin();
gps.begin();
}

The loop function now queries the location of the station and uploads it together with the value for temperature to the openSenseMap.

loop() Function
void loop(){
lat = gps.getLatitude();
lon = gps.getLongitude();
temp = hdc.getTemperature();


text:
# wx.FindReplaceDialog¶

wx.FindReplaceDialog is a standard modeless dialog which is used to allow the user to search for some text (and possibly replace it with something else).

The actual searching is supposed to be done in the owner window which is the parent of this dialog. Note that it means that unlike for the other standard dialogs this one must have a parent window. Also note that there is no way to use this dialog in a modal way; it is always, by design and implementation, modeless.

Please see the Dialogs Sample sample for an example of using it.

## Class Hierarchy¶

Inheritance diagram for class FindReplaceDialog:

wxMSW

wxMAC

wxGTK

## Methods Summary¶

 __init__ Create Creates the dialog; use wx.Window.Show to show it on screen. GetClassDefaultAttributes GetData Get the wx.FindReplaceData object used by this dialog.

## Class API¶

class wx.FindReplaceDialog(Dialog)

Possible constructors:

FindReplaceDialog()

FindReplaceDialog(parent, data, title="", style=0)

FindReplaceDialog is a standard modeless dialog which is used to allow the user to search for some text (and possibly replace it with something else).

### Methods¶

__init__(self, *args, **kw)

__init__ (self)

__init__ (self, parent, data, title=””, style=0)

After using default constructor Create must be called.

The parent and data parameters must be not None.

Parameters

Create(self, parent, data, title="", style=0)

Creates the dialog; use wx.Window.Show to show it on screen.

The parent and data parameters must be not None.

Parameters
Return type

bool

static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)
Parameters

variant (WindowVariant) –

Return type

wx.VisualAttributes

GetData(self)

Get the wx.FindReplaceData object used by this dialog.

Return type

wx.FindReplaceData

### Properties¶

Data


text:
# Configuring and building¶

## Configuring Flint¶

There are three ways to build Flint. One way is through a standard set of CMake files provided in the distribution. A second way is with a custom build system based on a configuration script and Makefiles also provided in the distribution. A third way using MSVC solution files is documented in a section further down.

The easiest way to use FLINT is to build a shared library. Simply download the FLINT tarball and untar it on your system.

FLINT requires either MPIR (version 2.6.0 or later) or GMP (version 5.1.1 or later). If MPIR is used, MPIR must be built with the --enable-gmpcompat option. FLINT also requires MPFR 3.0.0 or later and a pthread implementation.

Some of the input/output tests require fork and pipe, however these are disabled on Windows when a posix implementation is not provided.

If it happens that GMP/MPIR and MPFR are not in a standard location on your system (e.g. not in /usr/include/ and /usr/lib/), you need to tell the configure script where they are with the options --with-gmp=/path/to/gmp or --with-mpir=/path/to/mpir and --with-mpfr=/path/to/mpfr, e.g.

./configure --with-gmp=/home/user1/local --with-mpfr=/home/user1/local

FLINT can also build against a source build of GMP/MPIR and MPFR. Though programs using FLINT may require GMP/MPIR and MPFR to be installed (via make install if built from sources).

Note that FLINT builds static and shared libraries by default, except on platforms where this is not supported. If you do not require either a shared or static library then you may pass --disable-static or --disable-shared to configure. This can substantially speed up the build.

If you intend to install the FLINT library and header files, you can specify where they should be placed by passing --prefix=path to configure, where path is the directory under which the lib and include directories exist into which you wish to place the FLINT files when it is installed.

## TLS, reentrancy and single mode¶

FLINT uses thread local storage by default (--enable-tls). However, if reentrancy is required on systems that do not support this, one can pass --disable-tls and mutexes will be used instead (requires POSIX). As most modern systems support thread local storage, it is not recommended to build FLINT without TLS.

There are two modes in which FLINT may installed: the default single mode, which is faster, but makes use of thread local storage for its memory manager and to handle threading, and a slower but less complicated reentrant mode. The later is useful when debugging a program where tracing allocations is important.

If you wish to select the single mode, pass the --single option to configure, though note that this is the default. The reentrant mode is selected by passing the option --reentrant to configure.

## ABI and architecture support¶

On some systems, e.g. Sparc and some Macs, more than one ABI is available. FLINT chooses the ABI based on the CPU type available, however its default choice can be overridden by passing either ABI=64 or ABI=32 to configure.

To build on MinGW64 it is necessary to pass ABI=64 to configure, as FLINT is otherwise unable to distinguish it from MinGW32.

In some cases, it is necessary to override the CPU/OS defaults. This can be done by passing --build=cpu-os to configure.

The available choices for CPU include x86_64, x86, ia64, sparc, sparc64, ppc, ppc64. Other CPU types are unrecognised and FLINT will build with generic code on those machines.

The choices for OS include Linux, MINGW32, MINGW64, CYGWIN32, CYGWIN64, Darwin, FreeBSD, SunOS and numerous other operating systems.

It is also possible to override the default CC, AR and CFLAGS used by FLINT by passing CC=full_path_to_compiler, etc., to FLINT’s configure.

## C++ wrapper¶

If you wish to enable the test functions for the FLINT C++ wrapper flintxx you must pass --enable-cxx to configure.

The C++ wrapper is always available, but tests will only run if this option is selected. It is disabled by default (--disable-cxx) because some C++ compilers internally segfault when compiling the tests, or exhaust memory due to the complexity of the C++ code.

## Building, testing, installing and using FLINT¶

Once FLINT is configured, in the main directory of the FLINT directory tree simply type:

make
make check

GNU make or CMake is required to build FLINT. For GNU make, this is simply make on Linux, Darwin, MinGW and Cygwin systems. However, on some unixes the command is gmake. For CMake, this is cmake, which which may need to be installed with your package manager.

If you wish to install FLINT with GNU make, simply type:

make install

If you wish to install FLINT with CMake, simply type:

mkdir build && cd build
cmake .. -DBUILD_SHARED_LIBS=ON
cmake --build . --target install

Now to use FLINT, simply include the appropriate header files for the FLINT modules you wish to use in your C program. Then compile your program, linking against the FLINT library, GMP/MPIR, MPFR and pthreads with the options -lflint -lmpfr -lgmp -lpthread.

To uninstall FLINT with GNU make, type:

make uninstall

Note that you may have to set LD_LIBRARY_PATH or equivalent for your system to let the linker know where to find these libraries. Please refer to your system documentation for how to do this.

If you have any difficulties with conflicts with system headers on your machine, you can do the following in your code:

#undef ulong
#define ulong ulongxx
#include <stdio.h>
#undef ulong
#define ulong mp_limb_t

This prevents FLINT’s definition of ulong interfering with your system headers.

The FLINT custom make system responds to the standard commands

make
make library
make check
make clean
make distclean
make install

If your system supports parallel builds, FLINT will build in parallel, e.g:

make -j4 check

On some systems, parallel builds appear to be available but buggy.

## Testing a single module or file¶

If you wish to simply check a single module of FLINT you can pass the option MOD=modname to make check. You can also pass a list of module names in inverted commas, e.g:

make check MOD=ulong_extras
make check MOD="fft fmpz_mat"

To specify an individual test(s) for any module you can add it (or comma separated test list) after chosen module name followed by the colon, e.g.:

make check MOD=ulong_extras:clog,factor,is_prime

## Assertion checking¶

FLINT has an assert system. If you want a debug build you can pass --enable-assert to configure. However, this will slow FLINT considerably, so asserts should not be enabled (--disable-assert, the default) for deployment.

## Exceptions¶

When FLINT encounters a problem, mostly illegal input, it currently aborts. There is an experimental interface for generating proper exceptions flint_throw, but this is currently rarely used and experimental - you should expect this to change.

At the end, all of FLINT’s exceptions call abort() to terminate the program. Using flint_set_abort(void (*abort_func)(void)), the user can install a function that will be called instead. Similar to the exceptions, this should be regarded as experimental.

## Building FLINT2 with Microsoft Visual Studio using solution files¶

Brian Gladman has kindly provided the build scripts for building Flint with Microsoft Visual Studio.

Building FLINT2 with Microsoft Visual Studio requires Visual Studio 2015 Community (or higher version) and:

Obtain FLINT2 by cloning it using GIT from Brian Gladman’s repository:

git@github.com:BrianGladman/flint.git

FLINT2 depends on the MPIR, MPFR and PTHREADS libraries that have to be installed and built using Visual Studio before FLINT2 can be built. The application directories are assumed to be in the same root directory with the names and layouts:

mpir
lib
dll
mpfr
lib
dll
lib
dll
flint
build.vc
lib
dll

Here the lib and dll sub-directories for each application hold the static and dynamic link library outputs which will be used when Flint is built. They each contain up to four sub-directories for the normal configurations for building on Windows:

Win32\Release

Win32\Debug

x64\Release

x642\Debug

To build FLINT2 for a particular configuration requires that each of the three libraries on which FLINT2 depends must have been previously built for the same configuration.

Opening the solution file flint\build.vc\flint.sln provides the following build projects:

flint_config - a Python program for creating the Visual Studio build files

build_tests - a Python program for building the FLINT2 tests (after they have been created)

run_tests - a Python program for running the FLINT2 tests (after they have been built)

The first step in building FLINT2 is to generate the Visual Studio build files for the version of Visual Studio being used. This is done by running the Python application flint_config.py, either from within Visual Studio or on the command line. It is run with a single input parameter which is the last two digits of the Visual Studio version selected for building FLINT2 (the default is 19 if no input is given).

This creates a build directory in the Flint root directory, for example:

flint\build.vs19

that contains the file flint.sln which can now be loaded into Visual Studio and used to build the FLINT2 library.

Once the FLINT2 library has been built, the FLINT2 tests can now be built and run by returning to the Visual Studio solution:

flint\build.vc\flint.sln

and running the build_tests and run_tests Python applications.

After building FLINT2, the libraries and the header files that you need to use FLINT2 are placed in the directories:

• lib\<Win32|x64>\<Debug|Release>
• dll\<Win32|x64>\<Debug|Release>

depending on the version(s) that have been built.


text:
## How a Multivariable Function Changes with Respect to the Cartesian CoordinatesHow a Multivariable Function Changes with Respect to the Cartesian Coordinates

Suppose $F(x,y,z) \equiv f(x) g(y) h(z)$. This

## How a Multivariable Function Changes with Respect to an Azimuthal CoordinateHow a Multivariable Function Changes with Respect to an Azimuthal Coordinate

For a functions $f(x)$, $g(y)$

## How a Multivariable Function Changes with Respect to a Polar CoordinateHow a Multivariable Function Changes with Respect to a Polar Coordinate

For a functions $f(x)$, $g(y)$

## How a Multivariable Function Changes with Respect to a Radial CoordinateHow a Multivariable Function Changes with Respect to a Radial Coordinate

First focus on the Cartesian


text:
# Proving that a planar graph is bipartite [duplicate]

Let $G$ be a connected planar graph with a planar embedding where every face boundary is a cycle of even length. Prove that $G$ is bipartite.

It is quite easy to prove the converse, but how to do this? My line of thought is to assume an odd cycle and show a contradiction, but I don't know where to head? This is homework, so please give hints only, not a full solution.

-


text:
If you want to make money online : Register now

# [Answers] What is a recursion for Huffman encoding?

, ,
Problem Detail:

If I had to write the Huffman encoding as a recursion in terms of the cost $C_{ij}$, given weights/frequencies $W = [w_1,\ldots,w_n]$, how would I do it? (where this is creating a minimum cost tree, $C = \sum_i w_i \cdot \mathrm{depth}_i$).

I am going off of Dasgupta's Huffman procedure:

procedure Huffman(f)

Input: An array f[1···n] of frequencies

Output: An encoding tree with n leaves

let H be a priority queue of integers, ordered by f

for i = 1 to n:   insert(H,i)

for k = n+1 to 2n–1:

i = deletemin(H),   j = deletemin(H)

create a node numbered k with children i,j

f[k] = f[i] + f[j]

insert(H,k)

It should be something like the matrix multiplication order minimization algorithm, which seeks to minimize the total number of components calculated when multiplying a string of matrices,

$$C_{ij} = \min(C_{ik} + C_{k+1,j}+(m_i-1) \cdot m_k \cdot m_j)$$

Where $m_i,m_j$ are the dimensions of the matrix multiplication at the level directly below the node...

I wrote something like:

$$aC_{ij} = \min((a+1)C_{ik} + (a+1)C_{k+1,j}),\text{ for all } i,j,k$$

With base case: $C_{ii} = w_i$

Knowing full well that this is probably incorrect. But I don't understand how I should write it. I mean, I have the algorithm fine—just Huffman + DFS afterward (which always turns left, then right) to find out the order of the elements. But I don't understand how the recursion notation works in this situation.

#### Answered By : Yuval Filmus

Huffman's algorithm uses the greedy heuristic, which is different from the dynamic programming approach in the other problem you mention. However, we can still define the cost recursively.

There are actually several options. In all cases, given a distribution $p_1,\ldots,p_n$, we will find a formula for $C(p_1,\ldots,p_n)$, which is the optimal cost of a prefix code.

1. $C(1) = 0$.
2. $C(p_1,\ldots,p_n) = p_i + p_j + C(p_1,\ldots,\widehat{p_i},\ldots,\widehat{p_j},\ldots,p_n,p_i+p_j)$, where $p_i,p_j$ (for $i < j$) are the two smallest probabilities (i.e. $\max(p_i,p_j) \leq p_k$ for all $k \neq i,j$), and $\widehat{p_i}$ signifies that $p_i$ is removed.

The proof that this recurrence is correct is not immediate.

If we want a Huffman-like recurrence whose correctness is immediate, we need to tweak this only slightly:

1. $C(1) = 0$.
2. $C(p_1,\ldots,p_n) = \min_{i<j} [p_i + p_j + C(p_1,\ldots,\widehat{p_i},\ldots,\widehat{p_j},\ldots,p_n,p_i+p_j)]$.

This recurrence holds since (i) given a code for $p_1,\ldots,\widehat{p_i},\ldots,\widehat{p_j},\ldots,p_n,p_i+p_j$ we can get a code for $p_1,\ldots,p_n$ which is worse by $p_i+p_j$ by splitting the node corresponding to $p_i+p_j$ into two, and (ii) given a code for $p_1,\ldots,p_n$, if we choose any two sibling leaves $p_i,p_j$ then $C(p_1,\ldots,p_n) = p_i + p_j + C(p_1,\ldots,\widehat{p_i},\ldots,\widehat{p_j},\ldots,p_n,p_i+p_j)$.

A short reflection reveals that we can always ensure $j = n$ (say), and this leads to a simpler recurrence:

1. $C(1) = 0$.
2. $C(p_1,\ldots,p_n) = \min_{i<n} [p_i + p_n + C(p_1,\ldots,\widehat{p_i},\ldots,p_{n-1},p_i+p_n)]$.

The last two recurrences are bottom-up. There is also a top-down recurrence:

1. $C(1) = 0$.

2. $C(p_1,\ldots,p_n) = 1 + \min_{S \sqcup T = [n]} [C(p_S) + C(p_T)]$, where the minimization is over all partitions of $\{1,\ldots,n\}$ into two non-empty sets, and $p_S = (p_i : i \in S)$.

In this recurrence we are splitting the root instead of merging two sibling leaves. I leave to correctness proof for the reader.

Only the first recurrence above can be implemented efficiently.


text:
GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 25 Sep 2018, 06:33

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# If xy = 12, what is the value of x – y?

Author Message
TAGS:

### Hide Tags

Math Expert
Joined: 02 Sep 2009
Posts: 49495
If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

14 Apr 2015, 05:02
1
4
00:00

Difficulty:

35% (medium)

Question Stats:

67% (01:18) correct 33% (01:15) wrong based on 274 sessions

### HideShow timer Statistics

If xy = 12, what is the value of x – y?

(1) x > y
(2) x + y = 7

Kudos for a correct solution.

_________________
Retired Moderator
Status: On a mountain of skulls, in the castle of pain, I sit on a throne of blood.
Joined: 30 Jul 2013
Posts: 338
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

14 Apr 2015, 05:48
2
Bunuel wrote:
If xy = 12, what is the value of x – y?

(1) x > y
(2) x + y = 7

Kudos for a correct solution.

xy=12

x-y=?

1. x-y>0

Not Sufficient

2. x+y=7
x=12/y
12+y^2=7y
y^2-7y+12=0
(y-3)(y-4)=0
y=3 OR 4
x=4 OR 3
x-y=1 OR -1

Not Sufficient

1 and 2:
x>y
Therefore x=4; y=3 x-y=1

Sufficient

Manager
Joined: 17 Mar 2015
Posts: 120
If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

Updated on: 19 Apr 2015, 09:31
1
xy = 12
#1
x > y:
1: x = 4, y = 3, xy = 12, x - y = 1
2: x = 6, y = 2, xy = 12, x - y = 4
insufficient

#2 - x+y = 7:
x = 4, y = 3, xy = 12, x - y = 1
x = 3, y = 4, xy = 12, x - y = -1

insufficient

#1+#2
the system of equations xy = 12 and #2 yields 2 pairs of (x;y), namely (3;4) and (4;3). If we add the condition #1, we'll have only 1 pair remaining which is (4;3) which explicitly lets us answer our question.

Originally posted by Zhenek on 14 Apr 2015, 08:27.
Last edited by Zhenek on 19 Apr 2015, 09:31, edited 2 times in total.
Intern
Affiliations: University of texas at
Joined: 02 Apr 2013
Posts: 30
GMAT 1: 640 Q48 V30
GMAT 2: 710 Q49 V37
WE: Research (Consumer Products)
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

14 Apr 2015, 11:45
1
X will have only one value. But stat 2 gives us two values, stat 1 help us to discard one and keep one.
Ans:C
Manager
Joined: 01 Jan 2015
Posts: 56
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

14 Apr 2015, 14:03
St 1) X>Y -> 6X2 ; 4X3 etc.. NS
St 2) X+Y = 7 -> from ques X=12/Y; 12/Y+Y=7 So 12+Y^2=7Y -> Y=4 OR Y=3 Hence X=3 OR X=4
Combining 1&2
Only one unique value of X = 4
Intern
Joined: 10 Jun 2013
Posts: 18
Concentration: General Management, Technology
GMAT Date: 06-26-2015
WE: Corporate Finance (Venture Capital)
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

19 Apr 2015, 07:13
I've picked B, here is why,

In 2] X+Y=7

Then X=7-Y

Then XxY= 12 becomes
[7-Y]xY= 12

The only solution is Y=3

If Xx3=12 then X = 4

X-Y=1.

Correct me if i'm wrong
Retired Moderator
Status: On a mountain of skulls, in the castle of pain, I sit on a throne of blood.
Joined: 30 Jul 2013
Posts: 338
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

19 Apr 2015, 08:04
mike34170 wrote:
I've picked B, here is why,

In 2] X+Y=7

Then X=7-Y

Then XxY= 12 becomes
[7-Y]xY= 12

The only solution is Y=3

If Xx3=12 then X = 4

X-Y=1.

Correct me if i'm wrong

mike34170 When we take [7-Y]xY= 12, this can be expanded as
$$y^2$$-7y+12=0
(y-3)(y-4)=0
Therefore,
y can be 3 OR 4.

Replacing the values of y in the initial equation of xy=12 or x+y=7,
If y=3 then x=4 and x-y=1
If y=4 then x=3 and x-y= -1

Since there can be 2 possible values of x-y, namely 1 and -1, statement 2 is insufficient.

When we take both the statements together we know for sure that the instance 1 is true. That is,
If y=3 then x=4 and x-y=1

Since we need both the statements to get a unique value of x-y, answer is C.
Intern
Joined: 10 Jun 2013
Posts: 18
Concentration: General Management, Technology
GMAT Date: 06-26-2015
WE: Corporate Finance (Venture Capital)
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

19 Apr 2015, 08:22
AmoyV wrote:
mike34170 wrote:
I've picked B, here is why,

In 2] X+Y=7

Then X=7-Y

Then XxY= 12 becomes
[7-Y]xY= 12

The only solution is Y=3

If Xx3=12 then X = 4

X-Y=1.

Correct me if i'm wrong

mike34170 When we take [7-Y]xY= 12, this can be expanded as
$$y^2$$-7y+12=0
(y-3)(y-4)=0
Therefore,
y can be 3 OR 4.

Replacing the values of y in the initial equation of xy=12 or x+y=7,
If y=3 then x=4 and x-y=1
If y=4 then x=3 and x-y= -1

Since there can be 2 possible values of x-y, namely 1 and -1, statement 2 is insufficient.

When we take both the statements together we know for sure that the instance 1 is true. That is,
If y=3 then x=4 and x-y=1

Since we need both the statements to get a unique value of x-y, answer is C.

Hello AmoyV.

Exact, Y has two roots 3 and 4.
Math Expert
Joined: 02 Sep 2009
Posts: 49495
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

20 Apr 2015, 06:46
Bunuel wrote:
If xy = 12, what is the value of x – y?

(1) x > y
(2) x + y = 7

Kudos for a correct solution.

MAGOOSH OFFICIAL SOLUTION

In this case, the question includes an “if” statement, xy = 12.

Once again there is no obviously useful way to rephrase the question. We could, say, use the “if” equation to solve for y in terms of x, and substitute the resulting expression for y in the question. That’s not vey promising, though, so let’s turn to (1).

Even if we restrict ourselves to positive integers, the “if” statement and (1) together allow a number of solutions, each of which yields a different value for x – y. Specifically, x and y could be 12 and 1, 6 and 2, or 4 and 3, and could therefore be 11, 4, or 1. Eliminate A and D.

Statement (2) and the “if” statement together might seem to allow just one solution, x=4, y=3, and x-y=1. In fact, though, (2) and the “if” statement also allow x=3, y=4, =-1. So (2) is also not sufficient. Eliminate B.

Together (1) and (2) (along with the “if” statement) allow just one solution, x=4, y=3, and x-y=1.

_________________
Senior Manager
Joined: 27 Jul 2014
Posts: 287
Schools: ISB '15
GMAT 1: 660 Q49 V30
GPA: 3.76
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

02 Jul 2015, 11:57
My first though was Option C is correct

But then it struck me that there is nowhere mentioned that x& y are integer
so how can we choose c
IMO E is correct

Math Expert
Joined: 02 Sep 2009
Posts: 49495
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

02 Jul 2015, 12:06
kanigmat011 wrote:
My first though was Option C is correct

But then it struck me that there is nowhere mentioned that x& y are integer
so how can we choose c
IMO E is correct

xy = 12 and x + y = 7 gives x = 3 and y = 4 OR x = 4 and y = 3 but since it's given that x > y, then the first case is out and x - y = 1.
_________________
Senior Manager
Joined: 27 Jul 2014
Posts: 287
Schools: ISB '15
GMAT 1: 660 Q49 V30
GPA: 3.76
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

02 Jul 2015, 12:16
Bunuel wrote:
kanigmat011 wrote:
My first though was Option C is correct

But then it struck me that there is nowhere mentioned that x& y are integer
so how can we choose c
IMO E is correct

xy = 12 and x + y = 7 gives x = 3 and y = 4 OR x = 4 and y = 3 but since it's given that x > y, then the first case is out and x - y = 1.

Thanks Bunuel
Got it
Maybe i over exercised my brain on this one!
Manager
Joined: 07 Apr 2015
Posts: 175
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

03 Jul 2015, 09:53
Would it be enough to know that the equation out of 2 is a quadratic and will therefore almost always yield two different results? Bc. then x-y could be two different things.

or would you proceed and calculate it out? thx
Current Student
Joined: 20 Mar 2014
Posts: 2638
Concentration: Finance, Strategy
Schools: Kellogg '18 (M)
GMAT 1: 750 Q49 V44
GPA: 3.7
WE: Engineering (Aerospace and Defense)
If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

03 Jul 2015, 10:11
1
noTh1ng wrote:
Would it be enough to know that the equation out of 2 is a quadratic and will therefore almost always yield two different results? Bc. then x-y could be two different things.

or would you proceed and calculate it out? thx

No, you should atleast look at the discriminant of a quadratic equation.

D (discriminant) = $${b^2-4ac}$$, where a,b,c are coefficients of the quadratic equation, $$ax^2+bx+c=0$$

D can be <0, >0 or =0

Now, for 2 UNIQUE (or unequal real roots), D should be >0

For 2 EQUAL roots, D=0

For complex roots (not applicable for GMAT) , D<0

Thus, just knowing that an equation is quadratic IS NOT sufficient to say that you will get 2 different roots.

Example, $$x^2+5x+6=0$$ has 2 unique roots, x=2, x=3, D = $${6^2-4*1*6}$$ = 12 >0

But, $$x^2+6x+9=0$$, has 2 EQUAL roots and thus only 1 value, x=-3, D = $${6^2-4*1*9}$$ = 0

Another thing to look at in questions like these is whether the question stems prohibit 1 of 2 values that you obtain from a quadratic equation. In this case, although you did get 2 values, only 1 is allowed and this quadratic equation will thus be sufficient.
Intern
Joined: 01 Mar 2017
Posts: 14
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

01 Mar 2017, 23:04
HI, couldn't I just isolate "y" in the second statement, so that y=7-x, and then calculate the so asked "x-y" as: x-(7-x)=-7? so that statement 2 is actually sufficient?
thank you
Manager
Joined: 22 May 2015
Posts: 106
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

21 Mar 2017, 07:30
Juliaz wrote:
HI, couldn't I just isolate "y" in the second statement, so that y=7-x, and then calculate the so asked "x-y" as: x-(7-x)=-7? so that statement 2 is actually sufficient?
thank you

x-(7-x) = x-7-(-x) = x-7+x = 2x-7 .
_________________

Consistency is the Key

Intern
Joined: 18 Jan 2017
Posts: 31
Re: If xy = 12, what is the value of x – y?  [#permalink]

### Show Tags

21 Mar 2017, 07:36
The answer will be C... x.y=12 ; also both x and y have to be a factor of 12...

Sent from my GT-I9060I using GMAT Club Forum mobile app
Re: If xy = 12, what is the value of x – y? &nbs [#permalink] 21 Mar 2017, 07:36
Display posts from previous: Sort by

# If xy = 12, what is the value of x – y?

## Events & Promotions

 Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.