text:
# Is it possible to export a state (density matrix) in matrix form in a given basis?

+1 vote

I'm calculating time evolution in the Bose Hubbard model (using my own version of the hubbard site set). I would like to obtain the full state of my system in the Fock (number) basis at a given point to work further with it using different (Python) code. Is there an easy way to do this?

commented May 17 by (16,560 points)
Hi Andreas,
So just to understand: you aren't looking to export the MPS form of your wavefunction to your python code, correct? But instead the full wavefunction in an exponentially large many-body basis (presumably for a pretty small basis size)?
commented May 18 by (160 points)
edited May 18 by Andreas
Yes, exactly. For example, for a system of 6 lattice sites and 8 particles.

More precisely, I  simulate the time evolution of  a larger system via TEBD (e.g. 16 sites and 8 particles) and would like to export the reduced density matrix of a small subsystem (e.g. 6 sites and up to 8 particles, dimension 3003x3003) in the Fock basis.

answered May 18 by (16,560 points)

Assuming that you are using IQTensors (IQMPS) for your calculations, I would recommend the following:

(1) convert whichever tensors you want to export to just ITensors. So for an IQMPS convert it to an MPS. Or for an IQTensor (like a reduced density matrix) convert it to an ITensor.

(2) then call the "ordered" function on this ITensor to get a simple, plain tensor with a well-defined memory access pattern and contiguous storage in memory. For more information see the documentation of the ordered function on this page: http://itensor.org/docs.cgi?page=classes/itensor

auto t = ordered(T,i1,i2,i3); // <- here T is an ITensor
t(1,2,3); // <- how to access an element of the plain tensor t

(3) either use the .data() and .size() methods of the tensor object returned by the ordered function to write the tensor data to a file (binary stream) or explicitly loop over the indices of the returned tensor object and write them one at a time to a file in the way you wish (ascii or binary)

commented May 20 by (650 points)
Hi Miles,

I tried the method and it works perfectly well for IQTensor. However, for QDiagReal I got the error message
What is the correct way of doing this? Thanks!
commented May 20 by (16,560 points)
Thanks for pointing this out; it was a missing feature. But it was easy to add so I just added it. Please pull the latest version of ITensor, compile, and let me know if it still doesn't work for you.
commented May 20 by (650 points)
edited May 20 by chengshu
Thanks very much for the quick reply. Using the new version, the toITensor works well, but the "orderedC" function gives an error message:
The function "ordered" gives another error message:
applyFunc: function object has no operator() method for storage type
commented May 21 by (16,560 points)
I see. So do you really need to read a diagonal tensor using the ordered method? For example could you first multiply the diagonal tensor into a dense one and call ordered on that? Otherwise you will need to use the .real or .cplx methods to get the elements of the diagonal tensor. The reason ordered can't be defined for diagonal tensors is that we don't have sparse storage types for the basic tensors or we'd have to convert the diagonal tensors to dense to call ordered on them which could lead to accidental inefficient behavior.
commented May 21 by (650 points)
Thanks for the information. I am currently using a for loop to get all the elements and it works well. I'm just wondering whether a consistent method can be used so as to make the code more clear.
commented May 21 by (16,560 points)
Hm it is worth thinking about. One thing that could be done is to make a method specifically for getting the data of a diagonal tensor. There is actually a nice system for making on-the-fly functions that can easily be applied to "unwrap" and then operate on an ITensor's storage object.

Here's a quick example for DiagReal storage (the storage type of an diagonal-sparse ITensor):

//func is a "lambda" function
auto func = [](DiagReal const& d)
{
for(auto& el : d.store) print(" ",el);
println();
};

applyFunc(func,T.store()); //here T is an ITensor with DiagReal storage
//If T has a different kind of storage that func doesn't know how to act on,
//then an exception will be thrown by the above call
commented May 22 by (650 points)
Thanks for the nice function.
commented May 22 by (16,560 points)
edited May 22 by miles
Glad it is helpful. Eventually I want to have more documentation on the storage system (it's a really interesting and powerful system!). But for now if you want to understand a bit about each storage type you can look at their type definitions in the itdata folder (like itdata/diag.h for the DiagReal and DiagCplx storage types).

Also instead of "func" taking a single type of argument, it can actually be an object that overloads operator() to take multiple different storage types. So this can be used to have different behaviors for various storage types or to distinguish one storage type from another.

The most powerful part of all this is that the storage type is determined dynamically i.e. at run time. So it's similar to Julia's "multiple dispatch" feature but in C++. And it lets the code compile even if the function applied only accepts a subset of the storage types; for the missing ones code is injected at compile time to create run-time exceptions for those cases.


text:
### Courses

78 course(s)

###### Understanding Body Dysmorphic Disorder

Course Overview This course will allow readers to understand the impact of…

1 7 9
###### Understanding Affirmative Duty Requirements: Chapter 415 F.S.

Goals and Objectives The goal of this course is to help participants under…

1 7 398
###### Universal Infection Control

Goals and Objectives The goal of this course is to educate the reader on t…

1 9 310
###### Understanding HIV and AIDS

Goals and Objectives The goal of this course is to assist the reader in en…

1 7 412
###### Understanding Title V

Goals and Objectives This course will discuss the relevance of the Patient…

1 11 416

1 5 1

1 6 3

format: plain


text:
# central tendancy

1. ### Response time - what is the best central tendency measure?

I have a bunch of people working under me. I give them some tasks to complete on a regular basis. Some of the tasks are time bound and some aren't. I want to find a "measure" that best captures the response time of each employee. Finally based on this measure I want to see who is the best and...
2. ### computing mode of a density function in R

I want to compute mode of the following distribution in R. But i think my procedure is not correct to compute it . f <- function(x)(3/7)*x^2 #1<x<2 x=seq(1,2,length=5000) y = f(x) d = data.frame(x,y) d$x[d$y==max(d\$y)]
3. ### Measure Variability of data points

I'm struggling to find the appropriate solution to a project that I'm working on. I am trying measure the variability of lead time on products that we purchase I can't figure out what an appropriate calculation would be. Below are some of the details. - I'm trying to compare vendors. Some...


text:
# Using PostgreSQL as a Scalable, Durable, and Reliable Storage for Jaeger Tracing

Jaeger is an open-source solution for troubleshooting cloud-native applications using distributed tracing. It’s a Cloud Native Computing Foundation (CNCF) project at the Graduated maturity level that is widely adopted and commonly used alongside Prometheus to monitor applications running in Kubernetes.

Jaeger supports a growing number of storage backends and has two built-in ones: in-memory storage and local disk storage based on BadgerDB. They were designed to be used during testing but not for production use, where you need to ensure reliability, scalability, and durability, so your data survives restarts and system crashes.

To solve that problem, Jaeger has out-of-the-box support for storing traces in Elasticsearch and Cassandra. Elasticsearch is currently the recommended storage. Additionally, Jaeger offers a gRPC plugin API that you can use to integrate other storage systems.

In our conversations with Jaeger users, we learned that they often go with one of the storages not recommended for production (in-memory or BadgerDB). This is due to their lack of operational experience with Elasticsearch and Cassandra and their general awareness of how complex it is to run and manage these storage systems.

On the other hand, PostgreSQL is a familiar database for many engineers who use it to back their applications. It is also well-known for its friendly developer experience—unsurprisingly, it was voted the most loved database in Stack Overflow’s Developer Survey 2022.

Additionally, PostgreSQL offers a rich query experience with SQL, allowing engineers to analyze the trace data more deeply than when using Elasticsearch. There is a reason why SQL is the universal language for analytics.

This is why today we are announcing the ability to use PostgreSQL as a certified, durable, reliable, and scalable storage for Jaeger with Promscale.

Promscale is a unified metric and trace storage for Prometheus, Jaeger, and OpenTelemetry built on PostgreSQL and TimescaleDB. With Promscale, you get a centralized and reliable long-term storage for your metrics and traces that offers the following:

• Full Jaeger support: passes all the Jaeger storage certification tests, has native support for OpenTelemetry, and can be used as the metric storage backend for Jaeger’s Service Performance Management (SPM) feature.
• First-class Prometheus support: 100 % PromQL-compliant and support for PromQL alerts and recording rules, exemplars, Prometheus high availability, and multi-tenancy.
• Flexible storage: configurable downsampling and retention policies, including per-metric retention, data backfilling and deletion, and full support for both PromQL and SQL.
• Rock-solid foundation: built on the maturity of PostgreSQL and TimescaleDB with millions of instances worldwide. A trusted system offering scalability, high availability, replication, and data integrity.

Want to try it out? The easiest way to get started is to sign up for Timescale Cloud (create a free 30-day account, no credit card required). Self-hosting is also available for free.

## Jaeger Tracing With PostgreSQL: How This Works

Jaeger’s architecture is made of five components:

1. Client libraries: these can belong to Jaeger or OpenTelemetry.
2. The Agent: batches trace spans sent by client libraries and sends them to the Collector.
3. The Collector: receives all the trace spans, validates them, transforms them if needed, and sends them to the storage.
4. The Storage Plug-in: required for storage backends that are not supported out-of-the-box by Jaeger.
5. The Storage: where trace spans are saved and from where they are retrieved for display in the UI.
6. The Query Service: translates UI requests into backend queries.
7. The UI: displays the trace data.

Introducing support for a new database requires a new storage plugin. There are two ways to create it: through a binary that first needs to be packaged with Jaeger and then deployed or a remote storage plugin running on the storage side that can be enabled in Jaeger with a simple configuration change. The latter is an improvement that the Promscale team contributed to Jaeger last year. In both cases, the same storage gRPC API needs to be implemented so that Jaeger can write and read data from the database.

Promscale implements the remote storage plugin model, making integration with Jaeger much easier. It automatically creates and manages the schema in the database and converts the Jaeger data into that schema. The only change required in Jaeger to start storing and querying traces in PostgreSQL is to change a configuration parameter.

Additionally, we use TimescaleDB on top of PostgreSQL to improve ingest and query performance and reduce storage requirements, courtesy of TimescaleDB’s columnar compression. Our initial tests show ingestion rates above 100,000 spans per second on a single database node (16 CPU, 64 GB) with more than 90 % data compression on disk. We’ll publish detailed performance test results in the future.

### The certification process

Up until recently, the only storage backends that the Jaeger project promoted were Elasticsearch and Cassandra (for production use) and in-memory and BadgerDB (for testing). Why? Because Jaeger could not ensure that others would work well.

There is a long list of storage plugins that were built to integrate Jaeger with other databases. Unfortunately, the Jaeger community had difficulties assessing the quality of those plugins (do they support all Jaeger features, or are there any limitations?) and how well-supported they are (do they work with recent versions?). It’s also tough to find them since Jaeger does not promote them.

To address this issue, we collaborated with the Jaeger maintainers (special thanks to Yuri Shkuro, the project’s creator) to come up with a certification process for Jaeger’s storage backends. The goals of the process are two-fold:

1. Provide an easy way for any storage backend to measure and prove its compliance against Jaeger.
2. Make it easier for the Jaeger community to discover storage backends that are certified for 100 % compliance.

The end result is a Go package that can be easily used to run all of Jaeger’s gRPC storage tests against any storage:

import (
jaeger_integration_tests "github.com/jaegertracing/jaeger/plugin/storage/integration"
)

func TestJaegerStorageIntegration(t *testing.T) {
...
si := jaeger_integration_tests.StorageIntegration{
SpanWriter: createSpanWriter(),
CleanUp: func() error { ... },
Refresh: func() error { ... },
SkipList: []string {  // Skip any unsupported tests
},
}
// Runs all storage integration tests.
si.IntegrationTestAll(t)
}

This is an example of how we integrated these tests into the automated test suite used by Promscale.

The storage backend needs to make the results publicly available to claim certification. Ideally, the tests are integrated into the continuous integration pipeline, and the results are published with every new version. As an example, this is an excerpt of the Promscale results (full test results here):

=== RUN   TestJaegerStorageIntegration/streaming/GetDependencies
integration.go:370: Skipping GetDependencies test because dependency reader or writer is nil
--- PASS: TestJaegerStorageIntegration (19.41s)
--- PASS: TestJaegerStorageIntegration/sequential (9.33s)
--- PASS: TestJaegerStorageIntegration/sequential/GetServices (0.27s)
--- PASS: TestJaegerStorageIntegration/sequential/GetOperations (0.04s)
--- PASS: TestJaegerStorageIntegration/sequential/GetTrace (0.17s)
--- PASS: TestJaegerStorageIntegration/sequential/GetTrace/NotFound_error (0.00s)
--- PASS: TestJaegerStorageIntegration/sequential/GetLargeSpans (6.05s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces (0.62s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_in_one_spot_-_Tags (0.24s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_in_one_spot_-_Logs (0.02s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_in_one_spot_-_Process (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_in_different_spots (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Trace_spans_over_multiple_indices (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Operation_name (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Operation_name_+_max_Duration (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Operation_name_+_Duration_range (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Duration_range (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/max_Duration (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/default (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_+_Operation_name (0.02s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_+_Operation_name_+_max_Duration (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_+_Operation_name_+_Duration_range (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_+_Duration_range (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Tags_+_max_Duration (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Multi-spot_Tags_+_Operation_name (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Multi-spot_Tags_+_Operation_name_+_max_Duration (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Multi-spot_Tags_+_Operation_name_+_Duration_range (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Multi-spot_Tags_+_Duration_range (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Multi-spot_Tags_+_max_Duration (0.01s)
--- PASS: TestJaegerStorageIntegration/sequential/FindTraces/Multiple_Traces (0.01s)

You may notice in the full output that two tests are skipped:

--- SKIP: TestJaegerStorageIntegration/sequential/GetDependencies (0.00s)
…
--- SKIP: TestJaegerStorageIntegration/streaming/GetDependencies (0.00s)

The reason why they are skipped is that the Jaeger remote storage plugin interface does not support the ability to write dependencies yet. This data feeds the System Architecture tab in Jaeger.

As of today, Promscale is one of only two external certified storage backends.

## Setting Up Jaeger With Promscale and PostgreSQL as a Storage Backend

The complete high-level architecture of Promscale looks as follows:

We will only focus on the Jaeger-Promscale integration paths via the remote storage API for ingesting and visualizing trace data.

To integrate Jaeger with Promscale, you need to perform the following steps:

1. Set up the database consisting of PostgreSQL with TimescaleDB and the Promscale extension.
2. Deploy the Promscale Connector linked to the database.
3. Configure Jaeger to use PostgreSQL via Promscale as a storage backend.

### 1. Set up the database

The easiest way to get the database up is to use Timescale Cloud:

1. Sign up for a free 30-day trial. No credit card required.
2. Create a service using the advanced configuration. A single node with 2 CPUs / 8 GB supports up to 10,000 spans per second which will be plenty for testing. Also, increase storage to 500 GB. If you have specific requirements, you can check our resource recommendation guide. Copy the Service URL on the page after clicking on Create service. We’ll need it later.

If you prefer to self-host, follow the instructions in the documentation for your specific environment.

### 2. Deploy the Promscale Connector

The Promscale Connector is deployed in your infrastructure.

Deploy on Kubernetes with Helm

Replace <service-url> with the one you copied when you set up the database in the instructions below:

helm repo add timescale 'https://charts.timescale.com'
helm repo update
helm install promscale timescale/promscale --set connection.uri=<service-url>

Deploy with Docker

Replace <service-url> with the one you copied from Timescale Cloud in the instructions below:

docker run --name promscale -d -p 9201:9201 -p 9202:9202 -db.uri=<service-url>

For other deployment options, see the documentation.

### 3. Configure Jaeger

To set up Jaeger to connect to a storage via gRPC, you need to set two parameters:

• span-storage.type, which defines the type of storage Jaeger should use. This needs to be set to grpc-plugin to instruct Jaeger to use a storage that is connected via a gRPC plugin.
• grpc-storage.server, the server implementing the remote storage gRPC API or, in our case, the Promscale Connector. This should be set to <promscale-host>:9202. Replace <promscale-host> with the actual hostname or IP where you’ve deployed the Promscale Connector.

These parameters have to be passed to the Jaeger Collector and the Jaeger Query components (or to Jaeger all-in-one if that is what you are using). They can be passed as arguments to the CLI, configuration files, or environment variables. In the latter case, you have to replace the “-” and “.” in the parameter names with “_” and convert all characters to uppercase.

For example, to run the Jaeger Collector with Docker using Promscale as a storage backend, you would run:

docker run \
-e SPAN_STORAGE_TYPE=grpc-plugin \
-e GRPC_STORAGE_SERVER="<promscale-host>:9202" \
jaegertracing/jaeger-collector:1.38

## Additional Benefits of Using Promscale as a Jaeger Storage Backend

As we mentioned, Jaeger comes with two embedded storages (in-memory and BadgerDB), but they are not designed to be used in production because they aren’t built to be durable, reliable, and scalable.

For production workloads, Jaeger recommends Elasticsearch as the main option. Unfortunately, many engineers are not very familiar with Elasticsearch, and operating it is known to be pretty complex. As a result, many Jaeger users rely on in-memory or BadgerDB with the risk of losing access to their trace data when they most need it in the middle of a production incident.

PostgreSQL is a much more widely used database backing millions of applications; therefore, many more engineers are familiar with setting it up and operating it. On top of that, PostgreSQL is well-known for being very developer friendly. The ability to use PostgreSQL as a certified storage backend for Jaeger makes it easier for the community to adopt a durable, reliable, and scalable database to store their production traces. This ensures they always have access to their traces when they most need them.

• A storage backend for the Jaeger Service Performance Management (SPM) feature.
Jaeger SPM takes Jaeger from a tool that troubleshoots problems by exploring traces to a tool that allows proactive monitoring of your applications by looking at how your different services perform over time.
• SQL query capabilities on top of your traces so you can build dashboards in Grafana to get new insights from your traces. Get started with our out-of-the-box dashboards.

We have talked about querying traces with SQL several times in the past. We showed you how you could get more value out of traces by using this query language and other observability and data visualization tools and helped you understand your traces like never before using OpenTelemetry and PostgreSQL. Stay tuned, as we will publish a blog post about using Jaeger SPM with Promscale very shortly.

## Become a JaegerMaster With PostgreSQL and Promscale

Until recently, engineers who wanted to use a database that was 100 % Jaeger-compliant had to resort to Elasticsearch or Cassandra, both known for being difficult to operate.

Working alongside the maintainers of the Jaeger project, we created a new certification process for storage backends so that the community can use other databases to store their traces confidently.

Promscale is one of the only two currently certified Jaeger storage backends. With Promscale, the Jaeger community can finally make the most of a well-known, widely available, and user-friendly database to store their traces: PostgreSQL. You can connect Jaeger to Promscale with a simple configuration change, unlocking new capabilities, like Jaeger’s Service Performance Management and SQL queries, to analyze traces and build Grafana dashboards.

Get started now with Promscale on Timescale Cloud (free 30-day trial, no credit card required) or self-host for free.

The open-source relational database for time-series and analytics.
This post was written by


text:
# Converting a non-stationary random process into a WSS process by adding a random phase

Here is an example where this method has been implemented.

We were trying to calculate the spectrum of a transmitted signal(Random signal/weighted pulse)

1. The auto correlation function of the pulse which is not WSS because it is dependent on t:

1. We associated a random variable(which is the delay) with an uniform PDF with the signal:

1. PDF of the delay/the variable is:

I was unable to grasp the concept behind it, probably my basics are a bit rusty.

• By simply just associating a random variable (with an uniform PDF), how can we just make any random process a wide sense stationary process?
• Whats the concept behind it?
• when you make everything in a text bold and/or italics, then that ceases to highlight anything; hence, I "normalized" your formatting. – Marcus Müller Dec 9 '18 at 16:22
• But since we know nothing about the $P_T$, I don't think we can help you much. Define it! give context! Define what you mean with "associate"! – Marcus Müller Dec 9 '18 at 16:25

$$x(t)=\sum_ka_kp(t-kT)\tag{1}$$
The discrete values $$a_k$$ in $$(1)$$ are assumed to be random. The process $$x(t)$$ can be shown to be cyclostationary. The modified process
$$\tilde{x}(t)=\sum_ka_kp(t-kT+\theta)\tag{2}$$
where $$\theta$$ is a random variable uniformly distributed on $$[0,T]$$ is WSS. This random phase reflects our uncertainty about the phase of the signal, i.e., about the origin of the time axis. In this sense, it is physically motivated, and not just a nice "trick" enabling us to compute the power spectrum of $$(2)$$.


text:
# 1.4: Combinatorial Proofs

$$\def\d{\displaystyle}$$
$$\newcommand{\f}[1]{\mathfrak #1}$$
$$\newcommand{\s}[1]{\mathscr #1}$$
$$\def\N{\mathbb N}$$
$$\def\B{\mathbf{B}}$$
$$\def\circleA{(-.5,0) circle (1)}$$
$$\def\Z{\mathbb Z}$$
$$\def\circleAlabel{(-1.5,.6) node[above]{A}}$$
$$\def\Q{\mathbb Q}$$
$$\def\circleB{(.5,0) circle (1)}$$
$$\def\R{\mathbb R}$$
$$\def\circleBlabel{(1.5,.6) node[above]{B}}$$
$$\def\C{\mathbb C}$$
$$\def\circleC{(0,-1) circle (1)}$$
$$\def\F{\mathbb F}$$
$$\def\circleClabel{(.5,-2) node[right]{C}}$$
$$\def\A{\mathbb A}$$
$$\def\twosetbox{(-2,-1.5) rectangle (2,1.5)}$$
$$\def\X{\mathbb X}$$
$$\def\threesetbox{(-2,-2.5) rectangle (2,1.5)}$$
$$\def\E{\mathbb E}$$
$$\def\O{\mathbb O}$$
$$\def\U{\mathcal U}$$
$$\def\pow{\mathcal P}$$
$$\def\inv{^{-1}}$$
$$\def\nrml{\triangleleft}$$
$$\def\st{:}$$
$$\def\~{\widetilde}$$
$$\def\rem{\mathcal R}$$
$$\def\sigalg{\sigma-algebra }$$
$$\def\Gal{\mbox{Gal}}$$
$$\def\iff{\leftrightarrow}$$
$$\def\Iff{\Leftrightarrow}$$
$$\def\land{\wedge}$$
$$\def\And{\bigwedge}$$
$$\def\entry{\entry}$$
$$\def\AAnd{\d\bigwedge\mkern-18mu\bigwedge}$$
$$\def\Vee{\bigvee}$$
$$\def\VVee{\d\Vee\mkern-18mu\Vee}$$
$$\def\imp{\rightarrow}$$
$$\def\Imp{\Rightarrow}$$
$$\def\Fi{\Leftarrow}$$
$$\def\var{\mbox{var}}$$
$$\def\Th{\mbox{Th}}$$
$$\def\entry{\entry}$$
$$\def\sat{\mbox{Sat}}$$
$$\def\con{\mbox{Con}}$$
$$\def\iffmodels{\bmodels\models}$$
$$\def\dbland{\bigwedge \!\!\bigwedge}$$
$$\def\dom{\mbox{dom}}$$
$$\def\rng{\mbox{range}}$$
$$\def\isom{\cong}$$
$$\DeclareMathOperator{\wgt}{wgt}$$
$$\newcommand{\vtx}[2]{node[fill,circle,inner sep=0pt, minimum size=4pt,label=#1:#2]{}}$$
$$\newcommand{\va}[1]{\vtx{above}{#1}}$$
$$\newcommand{\vb}[1]{\vtx{below}{#1}}$$
$$\newcommand{\vr}[1]{\vtx{right}{#1}}$$
$$\newcommand{\vl}[1]{\vtx{left}{#1}}$$
$$\renewcommand{\v}{\vtx{above}{}}$$
$$\def\circleA{(-.5,0) circle (1)}$$
$$\def\circleAlabel{(-1.5,.6) node[above]{A}}$$
$$\def\circleB{(.5,0) circle (1)}$$
$$\def\circleBlabel{(1.5,.6) node[above]{B}}$$
$$\def\circleC{(0,-1) circle (1)}$$
$$\def\circleClabel{(.5,-2) node[right]{C}}$$
$$\def\twosetbox{(-2,-1.4) rectangle (2,1.4)}$$
$$\def\threesetbox{(-2.5,-2.4) rectangle (2.5,1.4)}$$
$$\def\ansfilename{practice-answers}$$
$$\def\shadowprops{ {fill=black!50,shadow xshift=0.5ex,shadow yshift=0.5ex,path fading={circle with fuzzy edge 10 percent}} }$$
$$\renewcommand{\bar}{\overline}$$
$$\newcommand{\card}[1]{\left| #1 \right|}$$
$$\newcommand{\twoline}[2]{\begin{pmatrix}#1 \\ #2 \end{pmatrix}}$$
$$\newcommand{\lt}{<}$$
$$\newcommand{\gt}{>}$$
$$\newcommand{\amp}{&}$$

$$\newcommand{\hexbox}[3]{ \def\x{-cos{30}*\r*#1+cos{30}*#2*\r*2} \def\y{-\r*#1-sin{30}*\r*#1} \draw (\x,\y) +(90:\r) -- +(30:\r) -- +(-30:\r) -- +(-90:\r) -- +(-150:\r) -- +(150:\r) -- cycle; \draw (\x,\y) node{#3}; }$$

$$\renewcommand{\bar}{\overline}$$
$$\newcommand{\card}[1]{\left| #1 \right|}$$
$$\newcommand{\twoline}[2]{\begin{pmatrix}#1 \\ #2 \end{pmatrix}}$$
$$\newcommand{\lt}{<}$$
$$\newcommand{\gt}{>}$$
$$\newcommand{\amp}{&}$$

Investigate!

1. The Stanley Cup is decided in a best of 7 tournament between two teams. In how many ways can your team win? Let's answer this question two ways:
1. How many of the 7 games does your team need to win? How many ways can this happen?
2. What if the tournament goes all 7 games? So you win the last game. How many ways can the first 6 games go down?
3. What if the tournament goes just 6 games? How many ways can this happen? What about 5 games? 4 games?
4. What are the two different ways to compute the number of ways your team can win? Write down an equation involving binomial coefficients (that is, $${n \choose k}$$'s). What pattern in Pascal's triangle is this an example of?
2. Generalize. What if the rules changed and you played a best of $$9$$ tournament (5 wins required)? What if you played an $$n$$ game tournament with $$k$$ wins required to be named champion?

## Patterns in Pascal's Triangle

Have a look again at Pascal's triangle. Forget for a moment where it comes from. Just look at it as a mathematical object. What do you notice?

There are lots of patterns hidden away in the triangle, enough to fill a reasonably sized book. Here are just a few of the most obvious ones:

1. The entries on the border of the triangle are all 1.
2. Any entry not on the border is the sum of the two entries above it.
3. The triangle is symmetric. In any row, entries on the left side are mirrored on the right side.
4. The sum of all entries on a given row is a power of 2. (You should check this!)

We would like to state these observations in a more precise way, and then prove that they are correct. Now each entry in Pascal's triangle is in fact a binomial coefficient. The 1 on the very top of the triangle is $${0 \choose 0}$$. The next row (which we will call row 1, even though it is not the top-most row) consists of $${1 \choose 0}$$ and $${1 \choose 1}$$. Row 4 (the row 1, 4, 6, 4, 1) consists of the binomial coefficients

\begin{equation*} {4 \choose 0} ~~ {4 \choose 1} ~~ {4 \choose 2} ~~ {4 \choose 3} ~~ {4 \choose 4}. \end{equation*}

Given this description of the elements in Pascal's triangle, we can rewrite the above observations as follows:

1. $${n \choose 0} = 1$$ and $${n \choose n} = 1$$.
2. $${n \choose k} = {n-1 \choose k-1} + {n-1 \choose k}$$.
3. $${n \choose k} = {n \choose n-k}$$.
4. $${n\choose 0} + {n \choose 1} + {n \choose 2} + \cdots + {n \choose n} = 2^n$$.

Each of these is an example of a binomial identity: an identity (i.e., equation) involving binomial coefficients.

Our goal is to establish these identities. We wish to prove that they hold for all values of $$n$$ and $$k$$. These proofs can be done in many ways. One option would be to give algebraic proofs, using the formula for $${n \choose k}\text{:}$$

\begin{equation*} {n \choose k} = \frac{n!}{(n-k)!\,k!}. \end{equation*}

Here's how you might do that for the second identity above.

Example $$\PageIndex{1}$$

Give an algebraic proof for the binomial identity

\begin{equation*} {n \choose k} = {n-1\choose k-1} + {n-1 \choose k}. \end{equation*}

Solution

Proof

By the definition of $${n \choose k}$$, we have

\begin{equation*} {n-1 \choose k-1} = \frac{(n-1)!}{(n-1-(k-1))!(k-1)!} = \frac{(n-1)!}{(n-k)!(k-1)!} \end{equation*}

and

\begin{equation*} {n-1 \choose k} = \frac{(n-1)!}{(n-1-k)!k!}. \end{equation*}

Thus, starting with the right-hand side of the equation:

\begin{align*} {n-1 \choose k-1} + {n-1 \choose k} \amp = \frac{(n-1)!}{(n-k)!(k-1)!}+ \frac{(n-1)!}{(n-1-k)!\,k!}\\ \amp = \frac{(n-1)!k}{(n-k)!\,k!} + \frac{(n-1)!(n-k)}{(n-k)!\,k!}\\ \amp = \frac{(n-1)!(k+n-k)}{(n-k)!\,k!}\\ \amp = \frac{n!}{(n-k)!\, k!}\\ \amp = {n \choose k}. \end{align*}

The second line (where the common denominator is found) works because $$k(k-1)! = k!$$ and $$(n-k)(n-k-1)! = (n-k)!$$.

$$\square$$

This is certainly a valid proof, but also is entirely useless. Even if you understand the proof perfectly, it does not tell you why the identity is true. A better approach would be to explain what $${n \choose k}$$ means and then say why that is also what $${n-1 \choose k-1} + {n-1 \choose k}$$ means. Let's see how this works for the four identities we observed above.

Example $$\PageIndex{2}$$

Explain why $${n \choose 0} = 1$$ and $${n \choose n} = 1$$.

Solution

What do these binomial coefficients tell us? Well, $${n \choose 0}$$ gives the number of ways to select 0 objects from a collection of $$n$$ objects. There is only one way to do this, namely to not select any of the objects. Thus $${n \choose 0} = 1$$. Similarly, $${n \choose n}$$ gives the number of ways to select $$n$$ objects from a collection of $$n$$ objects. There is only one way to do this: select all $$n$$ objects. Thus $${n \choose n} = 1$$.

Alternatively, we know that $${n \choose 0}$$ is the number of $$n$$-bit strings with weight 0. There is only one such string, the string of all 0's. So $${n \choose 0} = 1$$. Similarly $${n \choose n}$$ is the number of $$n$$-bit strings with weight $$n$$. There is only one string with this property, the string of all 1's.

Another way: $${n \choose 0}$$ gives the number of subsets of a set of size $$n$$ containing 0 elements. There is only one such subset, the empty set. $${n \choose n}$$ gives the number of subsets containing $$n$$ elements. The only such subset is the original set (of all elements).

Example $$\PageIndex{3}$$

Explain why $${n \choose k} = {n-1 \choose k-1} + {n-1 \choose k}$$.

Solution

The easiest way to see this is to consider bit strings. $${n \choose k}$$ is the number of bit strings of length $$n$$ containing $$k$$ 1's. Of all of these strings, some start with a 1 and the rest start with a 0. First consider all the bit strings which start with a 1. After the 1, there must be $$n-1$$ more bits (to get the total length up to $$n$$) and exactly $$k-1$$ of them must be 1's (as we already have one, and we need $$k$$ total). How many strings are there like that? There are exactly $${n-1 \choose k-1}$$ such bit strings, so of all the length $$n$$ bit strings containing $$k$$ 1's, $${n-1 \choose k-1}$$ of them start with a 1. Similarly, there are $${n-1\choose k}$$ which start with a 0 (we still need $$n-1$$ bits and now $$k$$ of them must be 1's). Since there are $${n-1 \choose k}$$ bit strings containing $$n-1$$ bits with $$k$$ 1's, that is the number of length $$n$$ bit strings with $$k$$ 1's which start with a 0. Therefore $${n \choose k} = {n-1\choose k-1} + {n-1 \choose k}$$.

Another way: consider the question, how many ways can you select $$k$$ pizza toppings from a menu containing $$n$$ choices? One way to do this is just $${n \choose k}$$. Another way to answer the same question is to first decide whether or not you want anchovies. If you do want anchovies, you still need to pick $$k-1$$ toppings, now from just $$n-1$$ choices. That can be done in $${n-1 \choose k-1}$$ ways. If you do not want anchovies, then you still need to select $$k$$ toppings from $$n-1$$ choices (the anchovies are out). You can do that in $${n-1 \choose k}$$ ways. Since the choices with anchovies are disjoint from the choices without anchovies, the total choices are $${n-1 \choose k-1}+{n-1 \choose k}$$. But wait. We answered the same question in two different ways, so the two answers must be the same. Thus $${n \choose k} = {n-1\choose k-1} + {n-1 \choose k}$$.

You can also explain (prove) this identity by counting subsets, or even lattice paths.

Example $$\PageIndex{4}$$

Prove the binomial identity ${n \choose k} = {n \choose n-k}. \nonumber$

Solution

Why is this true? $${n \choose k}$$ counts the number of ways to select $$k$$ things from $$n$$ choices. On the other hand, $${n \choose n-k}$$ counts the number of ways to select $$n-k$$ things from $$n$$ choices. Are these really the same? Well, what if instead of selecting the $$n-k$$ things you choose to exclude them. How many ways are there to choose $$n-k$$ things to exclude from $$n$$ choices. Clearly this is $${n \choose n-k}$$ as well (it doesn't matter whether you include or exclude the things once you have chosen them). And if you exclude $$n-k$$ things, then you are including the other $$k$$ things. So the set of outcomes should be the same.

Let's try the pizza counting example like we did above. How many ways are there to pick $$k$$ toppings from a list of $$n$$ choices? On the one hand, the answer is simply $${n \choose k}$$. Alternatively, you could make a list of all the toppings you don't want. To end up with a pizza containing exactly $$k$$ toppings, you need to pick $$n-k$$ toppings to not put on the pizza. You have $${n \choose n-k}$$ choices for the toppings you don't want. Both of these ways give you a pizza with $$k$$ toppings, in fact all the ways to get a pizza with $$k$$ toppings. Thus these two answers must be the same: $${n \choose k} = {n \choose n-k}$$.

You can also prove (explain) this identity using bit strings, subsets, or lattice paths. The bit string argument is nice: $${n \choose k}$$ counts the number of bit strings of length $$n$$ with $$k$$ 1's. This is also the number of bit string of length $$n$$ with $$k$$ 0's (just replace each 1 with a 0 and each 0 with a 1). But if a string of length $$n$$ has $$k$$ 0's, it must have $$n-k$$ 1's. And there are exactly $${n\choose n-k}$$ strings of length $$n$$ with $$n-k$$ 1's.

Example $$\PageIndex{5}$$

Prove the binomial identity ${n\choose 0} + {n \choose 1} + {n\choose 2} + \cdots + {n \choose n} = 2^n. \nonumber$

Solution

Proof

Let's do a “pizza proof” again. We need to find a question about pizza toppings which has $$2^n$$ as the answer. How about this: If a pizza joint offers $$n$$ toppings, how many pizzas can you build using any number of toppings from no toppings to all toppings, using each topping at most once?

On one hand, the answer is $$2^n$$. For each topping you can say “yes” or “no,” so you have two choices for each topping.

On the other hand, divide the possible pizzas into disjoint groups: the pizzas with no toppings, the pizzas with one topping, the pizzas with two toppings, etc. If we want no toppings, there is only one pizza like that (the empty pizza, if you will) but it would be better to think of that number as $${n \choose 0}$$ since we choose 0 of the $$n$$ toppings. How many pizzas have 1 topping? We need to choose 1 of the $$n$$ toppings, so $${n \choose 1}$$. We have:

Pizzas with 0 toppings: $${n \choose 0}$$ Pizzas with 1 topping: $${n \choose 1}$$ Pizzas with 2 toppings: $${n \choose 2}$$

The total number of possible pizzas will be the sum of these, which is exactly the left-hand side of the identity we are trying to prove.

Again, we could have proved the identity using subsets, bit strings, or lattice paths (although the lattice path argument is a little tricky).

• $$\vdots$$
• Pizzas with $$n$$ toppings: $${n \choose n}$$.

$$\square$$

Hopefully this gives some idea of how explanatory proofs of binomial identities can go. It is worth pointing out that more traditional proofs can also be beautiful.  3 Most every binomial identity can be proved using mathematical induction, using the recursive definition for $$n \choose k$$. We will discuss induction in Section 2.5. For example, consider the following rather slick proof of the last identity.

Expand the binomial $$(x+y)^n\text{:}$$

\begin{equation*} (x + y)^n = {n \choose 0}x^n + {n \choose 1}x^{n-1}y + {n \choose 2}x^{n-2}y^2 + \cdots + {n \choose n-1}x\cdot y^n + {n \choose n}y^n. \end{equation*}

Let $$x = 1$$ and $$y = 1$$. We get:

\begin{equation*} (1 + 1)^n = {n \choose 0}1^n + {n \choose 1}1^{n-1}1 + {n \choose 2}1^{n-2}1^2 + \cdots + {n \choose n-1}1\cdot 1^n + {n \choose n}1^n. \end{equation*}

Of course this simplifies to:

\begin{equation*} (2)^n = {n \choose 0} + {n \choose 1} + {n \choose 2} + \cdots + {n \choose n-1} + {n \choose n}. \end{equation*}

Something fun to try: Let $$x = 1$$ and $$y = 2$$. Neat huh?

## More Proofs

The explanatory proofs given in the above examples are typically called combinatorial proofs. In general, to give a combinatorial proof for a binomial identity, say $$A = B$$ you do the following:

1. Find a counting problem you will be able to answer in two ways.
2. Explain why one answer to the counting problem is $$A$$.
3. Explain why the other answer to the counting problem is $$B$$.

Since both $$A$$ and $$B$$ are the answers to the same question, we must have $$A = B$$.

The tricky thing is coming up with the question. This is not always obvious, but it gets easier the more counting problems you solve. You will start to recognize types of answers as the answers to types of questions. More often what will happen is you will be solving a counting problem and happen to think up two different ways of finding the answer. Now you have a binomial identity and the proof is right there. The proof is the problem you just solved together with your two solutions.

For example, consider this counting question:

How many 10-letter words use exactly four A's, three B's, two C's and one D?

Let's try to solve this problem. We have 10 spots for letters to go. Four of those need to be A's. We can pick the four A-spots in $${10 \choose 4}$$ ways. Now where can we put the B's? Well there are only 6 spots left, we need to pick $$3$$ of them. This can be done in $${6 \choose 3}$$ ways. The two C's need to go in two of the 3 remaining spots, so we have $${3 \choose 2}$$ ways of doing that. That leaves just one spot of the D, but we could write that 1 choice as $${1 \choose 1}$$. Thus the answer is:

\begin{equation*} {10 \choose 4}{6 \choose 3}{3 \choose 2}{1 \choose 1}. \end{equation*}

But why stop there? We can find the answer another way too. First let's decide where to put the one D: we have 10 spots, we need to choose 1 of them, so this can be done in $${10 \choose 1}$$ ways. Next, choose one of the $${9 \choose 2}$$ ways to place the two C's. We now have $$7$$ spots left, and three of them need to be filled with B's. There are $${7 \choose 3}$$ ways to do this. Finally the A's can be placed in $${4 \choose 4}$$ (that is, only one) ways. So another answer to the question is

\begin{equation*} {10 \choose 1}{9 \choose 2}{7 \choose 3}{4 \choose 4}. \end{equation*}

Interesting. This gives us the binomial identity:

\begin{equation*} {10 \choose 4}{6 \choose 3}{3 \choose 2}{1 \choose 1} = {10 \choose 1}{9 \choose 2}{7 \choose 3}{4 \choose 4}. \end{equation*}

Here are a couple of other binomial identities with combinatorial proofs.

Example $$\PageIndex{6}$$

Prove the identity

\begin{equation*} 1 n + 2(n-1) + 3 (n-2) + \cdots + (n-1) 2 + n 1 = {n+2 \choose 3}. \end{equation*}

Solution

To give a combinatorial proof we need to think up a question we can answer in two ways: one way needs to give the left-hand-side of the identity, the other way needs to be the right-hand-side of the identity. Our clue to what question to ask comes from the right-hand side: $${n+2 \choose 3}$$ counts the number of ways to select 3 things from a group of $$n+2$$ things. Let's name those things $$1, 2, 3, \ldots, n+2$$. In other words, we want to find 3-element subsets of those numbers (since order should not matter, subsets are exactly the right thing to think about). We will have to be a bit clever to explain why the left-hand-side also gives the number of these subsets. Here's the proof.

Proof

Consider the question “How many 3-element subsets are there of the set $$\{1,2,3,\ldots, n+2\}\text{?}$$” We answer this in two ways:

Answer 1: We must select 3 elements from the collection of $$n+2$$ elements. This can be done in $${n+2 \choose 3}$$ ways.

Answer 2: Break this problem up into cases by what the middle number in the subset is. Say each subset is $$\{a,b,c\}$$ written in increasing order. We count the number of subsets for each distinct value of $$b$$. The smallest possible value of $$b$$ is $$2$$, and the largest is $$n+1$$.

When $$b = 2$$, there are $$1 \cdot n$$ subsets: 1 choice for $$a$$ and $$n$$ choices (3 through $$n+2$$) for $$c$$.

When $$b = 3$$, there are $$2 \cdot (n-1)$$ subsets: 2 choices for $$a$$ and $$n-1$$ choices for $$c$$.

When $$b = 4$$, there are $$3 \cdot (n-2)$$ subsets: 3 choices for $$a$$ and $$n-2$$ choices for $$c$$.

And so on. When $$b = n+1$$, there are $$n$$ choices for $$a$$ and only 1 choice for $$c$$, so $$n \cdot 1$$ subsets.

Therefore the total number of subsets is

\begin{equation*} 1 n + 2 (n-1) + 3 (n-2) + \cdots + (n-1)2 + n 1. \end{equation*}

Since Answer 1 and Answer 2 are answers to the same question, they must be equal. Therefore

\begin{equation*} 1 n + 2 (n-1) + 3 (n-2) + \cdots + (n-1) 2 + n 1 = {n+2 \choose 3}. \end{equation*}

$$\square$$

Example $$\PageIndex{7}$$

Prove the binomial identity

\begin{equation*} {n \choose 0}^2 + {n \choose 1}^2 + {n \choose 2}^2 + \cdots + {n \choose n}^2 = {2n \choose n}. \end{equation*}

Solution 1

We will give two different proofs of this fact. The first will be very similar to the previous example (counting subsets). The second proof is a little slicker, using lattice paths.

Proof

Consider the question: “How many pizzas can you make using $$n$$ toppings when there are $$2n$$ toppings to choose from?”

Answer 1: There are $$2n$$ toppings, from which you must choose $$n$$. This can be done in $${2n \choose n}$$ ways.

Answer 2: Divide the toppings into two groups of $$n$$ toppings (perhaps $$n$$ meats and $$n$$ veggies). Any choice of $$n$$ toppings must include some number from the first group and some number from the second group. Consider each possible number of meat toppings separately:

0 meats: $${n \choose 0}{n \choose n}$$, since you need to choose 0 of the $$n$$ meats and $$n$$ of the $$n$$ veggies.

1 meat: $${n \choose 1}{n \choose n-1}$$, since you need 1 of $$n$$ meats so $$n-1$$ of $$n$$ veggies.

2 meats: $${n \choose 2}{n \choose n-2}$$. Choose 2 meats and the remaining $$n-2$$ toppings from the $$n$$ veggies.

And so on. The last case is $$n$$ meats, which can be done in $${n \choose n}{n \choose 0}$$ ways.

Thus the total number of pizzas possible is

\begin{equation*} {n \choose 0}{n \choose n} + {n \choose 1}{n \choose n-1} + {n \choose 2}{n \choose n-2} + \cdots + {n \choose n}{n \choose 0}. \end{equation*}

This is not quite the left-hand side … yet. Notice that $${n \choose n} = {n \choose 0}$$ and $${n \choose n-1} = {n \choose 1}$$ and so on, by the identity in Example 1.4.4. Thus we do indeed get

\begin{equation*} {n \choose 0}^2 + {n \choose 1}^2 + {n \choose 2}^2 + \cdots + {n \choose n}^2. \end{equation*}

Since these two answers are answers to the same question, they must be equal, and thus

\begin{equation*} {n \choose 0}^2 + {n \choose 1}^2 + {n \choose 2}^2 + \cdots + {n \choose n}^2 = {2n \choose n}. \end{equation*}

$$\square$$

For an alternative proof, we use lattice paths. This is reasonable to consider because the right-hand side of the identity reminds us of the number of paths from $$(0,0)$$ to $$(n,n)$$.

Proof

Consider the question: How many lattice paths are there from $$(0,0)$$ to $$(n,n)\text{?}$$

Answer 1: We must travel $$2n$$ steps, and $$n$$ of them must be in the up direction. Thus there are $${2n \choose n}$$ paths.

Answer 2: Note that any path from $$(0,0)$$ to $$(n,n)$$ must cross the line $$x + y = n$$. That is, any path must pass through exactly one of the points: $$(0,n)$$, $$(1,n-1)$$, $$(2,n-2)$$, …, $$(n, 0)$$. For example, this is what happens in the case $$n = 4\text{:}$$

How many paths pass through $$(0,n)\text{?}$$ To get to that point, you must travel $$n$$ units, and $$0$$ of them are to the right, so there are $${n \choose 0}$$ ways to get to $$(0,n)$$. From $$(0,n)$$ to $$(n,n)$$ takes $$n$$ steps, and $$0$$ of them are up. So there are $${n \choose 0}$$ ways to get from $$(0,n)$$ to $$(n,n)$$. Therefore there are $${n \choose 0}{n \choose 0}$$ paths from $$(0,0)$$ to $$(n,n)$$ through the point $$(0,n)$$.

What about through $$(1,n-1)$$. There are $${n \choose 1}$$ paths to get there ($$n$$ steps, 1 to the right) and $${n \choose 1}$$ paths to complete the journey to $$(n,n)$$ ($$n$$ steps, $$1$$ up). So there are $${n \choose 1}{n \choose 1}$$ paths from $$(0,0)$$ to $$(n,n)$$ through $$(1,n-1)$$.

In general, to get to $$(n,n)$$ through the point $$(k,n-k)$$ we have $${n \choose k}$$ paths to the midpoint and then $${n \choose k}$$ paths from the midpoint to $$(n,n)$$. So there are $${n \choose k}{n \choose k}$$ paths from $$(0,0)$$ to $$(n,n)$$ through $$(k, n-k)$$.

All together then the total paths from $$(0,0)$$ to $$(n,n)$$ passing through exactly one of these midpoints is

\begin{equation*} {n \choose 0}^2 + {n \choose 1}^2 + {n \choose 2}^2 + \cdots + {n \choose n}^2. \end{equation*}

Since these two answers are answers to the same question, they must be equal, and thus

\begin{equation*} {n \choose 0}^2 + {n \choose 1}^2 + {n \choose 2}^2 + \cdots + {n \choose n}^2 = {2n \choose n}. \end{equation*}

$$\square$$


text:
# Problem installing android_core on Ubuntu 14.04, ROS indigo

Hi, I am trying to install android_core ... but im getting an error .... here is some background info

I had already installed Android Studio on Ubuntu 14.04 ... the full studio and not the stand alone SDK .... and it is working fine, but only from the IDE, and not in combination with ROS (I was still learning Android) .. everything works just fine now .. updates, using app in the phone, using app in the emulator, deployment, everything.

I also had already installed ROS indigo ... and also everything works just fine .. i also have my Turtlebot, and all its apps and related packages works just fine as well .. through launches or romocon

NOW .. i want to combine them both .. that is develop Android apps for ROS .. so i following the installation instructions on this link ... here is wht i did:

1. Prerequisites:

Since i already have Android Studio & Java JDK .. it was just a matter of setting the env to the installation locations ... here is what i put in the .bashrc

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre

export PATH=${PATH}:~/Android/Sdk/tools:~/Android/Sdk/platform-tools:~/android-studio/bin export ANDROID_HOME=~/android-studio "Yes ... these locations are weird .. but this is where i had already installed my Android Studio ... will this cause a problem?" 2. Source Installation of Java I followed the instructions on this link "3.1 - Core installation" .. and it worked just fine 3. Source Installation of android_core: I followed the instructions on this link "4.1 - Core Installation" ... and here is where the problems started ... all went well till the last command ... here is what happened: samihajjaj@sami:~/android_core$ catkin_make
Base path: /home/samihajjaj/android_core
Source space: /home/samihajjaj/android_core/src
Build space: /home/samihajjaj/android_core/build
Devel space: /home/samihajjaj/android_core/devel
Install space: /home/samihajjaj/android_core/install
####
#### Running command: "make cmake_check_build_system" in "/home/samihajjaj/android_core/build"
####
####
#### Running command: "make -j4 -l4" in "/home/samihajjaj/android_core/build"
####

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':android_15'.
> Could not resolve all dependencies for configuration ':android_15:_debugCompile'.
> Could not find com.android.support:support-v4:21.0.3.
Searched in the following locations:
file:/home/samihajjaj/android_core/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
file:/home/samihajjaj/android_core/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
file:/home/samihajjaj/rosjava/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
file:/home/samihajjaj/rosjava/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
file:/opt/ros/indigo/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
file:/opt/ros/indigo/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
https://github.com/rosjava/rosjava_mvn_repo/raw/master/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
https://github.com/rosjava/rosjava_mvn_repo/raw/master/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
file:/home ...
edit retag close merge delete

Sort by » oldest newest most voted

well .. I found the solution to the problem above .. apparently ... and for some reason that i do not know yet .. catkin was looking at the wrong places to where the support files were ... so to solve the problem above .. ull need to define a new env. variable in ur bash file .. that variable will tell catkin where the support files are on ur system .. here is how:

in ur .bashrc file ... add either one the following lines below ..

export ROS_MAVEN_REPOSITORY=(location to where the support files are on ur system)

export ROS_MAVEN_PATH=(location to where the support files are on ur system)

either line will do the trick as catkin will first look for the ROS_MAVEN_REPOSITORY variable, then the ROS_MAVEN_PATH ... and it doesnt really hurt to put them both

NOTE: I cant chose my own answer as correct because i dont have enough points

more


text:
# Tajima's D: Wikis

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

# Encyclopedia

Tajima's D is a statistical test created by and named after the Japanese researcher Fumio Tajima. The purpose of the test is to distinguish between a DNA sequence evolving randomly ("neutrally") and one evolving under a non-random process, including directional selection or balancing selection, demographic expansion or contraction, genetic hitchhiking, or introgression. A randomly evolving DNA sequence contains mutations with no effect on the fitness and survival of an organism. The randomly evolving mutations are called "neutral", while mutations under selection are "non-neutral". For example, you would expect to find that a mutation which causes prenatal death or severe disease to be under selection.

According to Motoo Kimura's neutral theory of molecular evolution, the majority of mutations in the human genome are neutral, ie have no effect on fitness and survival. When looking at the human population as a whole, we say that the population frequency of a neutral mutation fluctuates randomly (ie the percentage of people in the population with the mutation changes from one generation to the next, and this percentage is equally likely to go up or down), through genetic drift.

The strength of genetic drift depends on the population size. If a population is at a constant size with constant mutation rate, the population will reach an equilibrium of gene frequencies. This equilibrium has important properties, including the number of segregating sites S / , and the number of nucleotide differences between pairs sampled (these are called pairwise differences). To standardize the pairwise differences, the mean or 'average' number of pairwise differences is used. This is simply the sum of the pairwise differences divided by the number of pairs, and is signified by π.

The purpose of Tajima's test is to identify sequences which do not fit the neutral theory model at equilibrium between mutation and genetic drift. In order to perform the test on a DNA sequence or gene, you need to sequence homologous DNA for at least 3 individuals. Tajima's statistic computes a standardized measure of the total number of segregating sites (these are DNA sites that are polymorphic) in the sampled DNA and the average number of mutations between pairs in the sample. The two quantities whose values are compared are both method of moments estimates of the population genetic parameter theta, and so are expected to equal the same value. If these two numbers only differ by as much as one could reasonably expect by chance, then the null hypothesis of neutrality cannot be rejected. Otherwise, the null hypothesis of neutrality is rejected.

## Hypothetical example

Lets say that you are a genetic researcher who finds two mutations, a mutation in a gene which causes pre-natal death and a mutation in DNA which has no effect on human health or survival. You publish your findings in a scientific journal, identifying the first mutation as "under negative selection" and the second as "neutral". The neutral mutation gets passed on from one generation to the next, while the mutation under negative selection disappears, since anyone with the mutation cannot reproduce and pass it on to the next generation.

In order to back your discovery with more scientific evidence, you gather DNA samples from 100 people and determine the exact DNA sequence for the gene in each of these 100. Using all 100 DNA samples as input, you determine Tajima's D on both the detrimental mutation and the 'neutral' DNA. If your hypothesis was correct, then Tajima's Test will output "neutral" for the neutral mutation and "non-neutral" for the gene.

## Scientific explanation

Under the neutral theory model, for a population at constant size at equilibrium:

$E[\pi]=\theta=E\left[\frac{S}{\sum_{i=1}^{n-1} \frac{1}{i}}\right]=4N\mu$

for diploid DNA, and

$E[\pi]=\theta=E\left[\frac{S}{\sum_{i=1}^{n-1} \frac{1}{i}}\right]=2N\mu$

for haploid.

In the above formulas, S is the number of segregating sites, n is the number of samples, and i is the index of summation. But selection, demographic fluctuations and other violations of the neutral model (including rate heterogeneity and introgression) will change the expected values of S and π, so that they are no longer expected to be equal. The difference in the expectations for these two variables (which can be positive or negative) is the crux of Tajima's D test statistic.

$D\,$ is calculated by taking the difference between the two estimates of the population genetics parameter $\theta\,$. This difference is called $d\,$, and D is calculated by dividing $d\,$ by the square root of its variance $\sqrt{\hat{V}(d)}$ (its standard deviation, by definition).

$D=\frac {d} {\sqrt {\hat{V}(d)} }$

Fumio Tajima demonstrated by computer simulation that the $D\,$ statistic described above could be modeled using a beta distribution. If the $D\,$ value for a sample of sequences is outside the confidence interval then one can reject the null hypothesis of neutral mutation for the sequence in question.

## Statistical test

When performing a statistical test such as Tajima's D, the critical question is whether the value calculated for the statistic is unexpected under a null process. For Tajima's D, the magnitude of the statistic is expected to increase the more the history of the population deviates from a history expected under neutrality. In the example below, we show the calculation of this statistic for some data, and find that it is unusual.

In Tajima's Test, the null hypothesis is neutral evolution.

## Mathematical details

$D=\frac {d} {\sqrt {\hat{V}(d)} } = \frac {\hat{k} - \frac{S}{a_1} } {\sqrt {[e_1S+e_2S(S-1)]} }$

where

 $e_1 = \frac {c_1}{a_1}$ $e_2 = \frac{c_2}{a_1^2+a_2}$ $c_1 = b_1 - \frac {1}{a_1}$ $c_2 = b_2 - \frac{n+2}{a_{1}n} +\frac{a_2}{a_{1}^{2}}$ $b_1 = \frac {n+1}{3(n-1)}$ $b_2 = \frac{2(n^{2}+n+3)}{9n(n-1)}$ $a_1 = \sum_{i=1}^{n-1} \frac{1}{i}$ $a_2 = \sum_{i=1}^{n-1} \frac{1}{i^2}$

$\hat{k}\,$ and $\frac{S}{a_1}$ are two estimates of the expected number of single nucleotide polymorphisms (SNPs)between two DNA sequences under the neutral mutation model in a sample size $n\,$ from an effective population size $N\,$

The first estimate is the average number of SNPs found in (n choose 2) pairwise comparisons of sequences (i,j) in the sample

$\hat{k}= \frac { \sum\sum_{i

The second estimate is derived from the expected value of $S\,$, the total number of polymorphisms in the sample

$E(S)=a_1M\,$

Tajima defines $M=4N\mu\,$, whereas Hartl & Clark use a different symbol to define the same parameter $\theta=4N\mu\,$.

## Historical example

The genetic mutation which causes sickle-cell anemia is non-neutral because it affects survival and fitness. People homozygous for the mutation have the sickle-cell disease, while those without the mutation (homozygous for the wild-type allele) do not have the disease. People with one copy of the mutated allele (heterozygous) do not have the disease, but instead are resistant to malaria. Thus in Africa, where there is a prevalence of the malaria parasite Plasmodium falciparum that is transmitted through mosquitos Anopheles, there is a selective advantage for heterozygous individuals. Meanwhile, in countries such as the USA where the risk of malaria infection is low, the population frequency of the mutation is lower.

## Example

Suppose you are a geneticist studying an unknown gene. As part of your research you get DNA samples from four random people (plus yourself). For simplicity, you label your sequence as a string of zeroes, and for the other four people you put a zero when their DNA is the same as yours and a one when it is different. (For this example, the specific type of difference is not important.)

Position 12345 67890 12345 67890
Person Y 00000 00000 00000 00000
Person A 00100 00000 00100 00010
Person B 00000 00000 00100 00010
Person C 00000 01000 00000 00010
Person D 00000 01000 00100 00010

Notice the four polymorphic sites (positions where someone differs from you, at 3, 7, 13 and 19 above). Now compare each pair of sequences and get the average number of polymorphisms between two sequences. There are "five choose two" (ten) comparisons that need to be done.

Person Y is you!

You vs A
Person Y 00000 00000 00000 00000
Person A 00100 00000 00100 00010
3 polymorphisms
You vs B
Person Y 00000 00000 00000 00000
Person B 00000 00000 00100 00010
2 polymorphisms
You vs C
Person Y 00000 00000 00000 00000
Person C 00000 01000 00000 00010
2 polymorphisms
You vs D
Person Y 00000 00000 00000 00000
Person D 00000 01000 00100 00010
3 polymorphisms
A vs B
Person A 00100 00000 00100 00010
Person B 00000 00000 00100 00010
1 polymorphism
A vs C
Person A 00100 00000 00100 00010
Person C 00000 01000 00000 00010
3 polymorphisms
A vs D
Person A 00100 00000 00100 00010
Person D 00000 01000 00100 00010
2 polymorphisms
B vs C
Person B 00000 00000 00100 00010
Person C 00000 01000 00000 00010
2 polymorphisms
B vs D
Person B 00000 00000 00100 00010
Person D 00000 01000 00100 00010
1 polymorphism
C vs D
Person C 00000 01000 00000 00010
Person D 00000 01000 00100 00010
1 polymorphism

The average number of polymorphisms is ${3 + 2 + 2 + 3 + 1 + 3 + 2 + 2 + 1 + 1\over 10} = 2$.

The lower-case d described above is the difference between these two numbers—the average number of polymorphisms found in pairwise comparison (2) and the total number of polymorphic sites (4). Thus d = 2 − 4 = − 2.

Since this is a statistical test, you need to assess the significance of this value. A discussion of how to do this is provided below.

## Significance

A negative Tajima's D signifies an excess of low frequency polymorphisms, indicating population size expansion and/or positive selection. A positive Tajima's D signifies low levels of both low and high frequency polymorphisms, indicating a decrease in population size and/or balancing selection. However, calculating a conventional "p-value" associated with any Tajima's D value that is obtained from a sample is impossible. Briefly, this is because there is no way to describe the distribution of the statistic that is independent of the true, and unknown, theta parameter (no pivot quantity exists). To circumvent this issue, several options have been proposed.

Tajima (1989) found an empirical similarity between the distribution of the test statistic and a beta distribution with mean zero and variance one. He estimated theta by taking Watterson's estimator and dividing it the number of samples. Simulations have shown this distribution to be conservative (Fu and Li, 1991) , and now that the computing power is more readily available this approximation is not frequently used.

A more nuanced approach was presented in a paper by Simonsen et. al. These authors advocated constructing a confidence interval for the true theta value, and then performing a grid search over this interval to obtain the critical values at which the statistic is significant below a particular alpha value. An alternative approach is for the investigator to perform the grid search over the values of theta which they believe to be plausible based on their knowledge of the organism under study. Bayesian approaches are a natural extension of this method.

A very rough rule of thumb to significance is that values greater than +2 or less than -2 are likely to be significant. This rule is based on an appeal to asymptotic properties of some statistics, and thus +/- 2 does not actually represent a critical value for a significance test.

Finally, genome wide scan's of Tajima's D in sliding windows along a chromosomal segment are often performed. With this approach, those regions that have a value of D that greatly deviates from the bulk of the empirical distribution of all such windows are reported as significant. This method does not assess significance in the traditional statistical test, but is quite powerful given a large genomic region, and is unlikely to falsely identify interesting regions of a chromosome if only the greatest outliers are reported.

## References

[1] Statistical Method for Testing the Neutral Mutation Hypothesis by DNA Polymorphism. Fumio Tajima. Genetics, 123: 585-595.
[2] Principles of Population Genetics, 4th ed. Daniel L. Hartl & Andrew G. Clark. Sinauer Associates, Inc. 2007
[3] Properties of Statistical Tests of Neutrality for DNA Polymorphism Data, Genetics, 1995

## Computational tools for Tajima's D test

• [4] DNAsp (Windows)
• [5] Variscan (Mac OS X, Linux, Windows)
• [6] Arlequin (Windows)
• [7] Online view of Tajima'S D values in human genome
• [8] Online computation of Tajima's D
• MEGA4


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

 It is currently 25 May 2019, 00:59

### 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

# From 1980 to 1989, total consumption of fish in the country of Jurania

Author Message
TAGS:

### Hide Tags

Senior Manager
Joined: 04 Jul 2014
Posts: 295
Location: India
GMAT 1: 640 Q47 V31
GMAT 2: 640 Q44 V34
GMAT 3: 710 Q49 V37
GPA: 3.58
WE: Analyst (Accounting)
From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

Updated on: 23 Jan 2019, 06:10
12
60
00:00

Difficulty:

45% (medium)

Question Stats:

64% (01:42) correct 36% (01:52) wrong based on 1314 sessions

### HideShow timer Statistics

From 1980 to 1989, total consumption of fish in the country of Jurania increased by 4.5 percent, and total consumption of poultry products there increased by 9.0 percent. During the same period, the population of Jurania increased by 6 percent, in part due to immigration to Jurania from other countries in the region.

If the statements above are true, which of the following must also be true on the basis of them?

(A) During the 1980s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.

(B) For people who immigrated to Jurania during the 1980s, fish was less likely to be a major part of their diet than was poultry.

(C) In 1989 Juranians consumed twice as much poultry as fish.

(D) For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980s.

(E) Per capita consumption of fish in Jurania was lower in 1989 than in 1980.

Source : GMATPrep Default Exam Pack

_________________
Cheers!!

JA
If you like my post, let me know. Give me a kudos!

Originally posted by AdmitJA on 21 Nov 2014, 07:38.
Last edited by Bunuel on 23 Jan 2019, 06:10, edited 4 times in total.
Edited the question.
Intern
Joined: 23 Sep 2014
Posts: 34
Location: India
Concentration: Marketing, Finance
GMAT 1: 670 Q48 V34
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

09 Dec 2014, 00:33
24
7
Take the population to be 100
Fish - 100
and
Poultry consumption also as 100

So after Increase
Population in 1989 - 106
Fish- 104.5

and
poultry 109

So per capita for fish consumption in 1980 was 100/100 = 1
in
1989 it becomes 104.5/106 <1

So fish consumption decreases.

Hope this helps
##### General Discussion
Joined: 24 Oct 2012
Posts: 167
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

07 Sep 2015, 20:13
8
5
Information that we have.

Delta in Consumption of Fish = 4.5%
Delta in Consumption of Poultry = 9%
Delta in Population = 9 %

distracting information : Migrants ..

A. During the 1980’s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.
This has not been discussed anywhere - Out of scope

B. For people who immigrated to Jurania during the 1980’s, fish was less likely to be a major part of their diet than was poultry.
Hmm Attractive, but where in entire argument, Choice of immigrated crowd is discussed - Isn't it wrong to say about the choice, when it is not even discussed - Incorrect

C. In 1989 Juranians consumed twice as much poultry as fish.
Only percentage change is given, From percentage change we cannot derive Actual numbers. - Incorrect

D. For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980’s.
Significant or not, not sure but it was part of diet - Might be true - Incorrect

E. Per capita consumption of fish in Jurania was lower in 1989 than in 1980.

Per capita consumption = Total Consumption/No of people.

E says, since the rate of increase of the denominator is higher than the rate of increase of the numerator, we will have a resulting decrease in per-capita consumption.
Verbal Forum Moderator
Status: Greatness begins beyond your comfort zone
Joined: 08 Dec 2013
Posts: 2292
Location: India
Concentration: General Management, Strategy
Schools: Kelley '20, ISB '19
GPA: 3.2
WE: Information Technology (Consulting)
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

28 Oct 2015, 20:18
1
3
A.During the 1980’s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.
Profits have not been discussed .Need not be true.
B.For people who immigrated to Jurania during the 1980’s, fish was less likely to be a major part of their diet than was poultry.
It might look an attractive trap answer . But this need not necessarily be true as the percentage increase needn't be attributed
to the entire migrant population . There is also a possibility that a major part of the percentage increase was due to more consumption by the natives.
C.In 1989 Juranians consumed twice as much poultry as fish.
Only percentage change is given . Deriving actual numbers from percentage is a strech.
D.For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980’s.
Needn't be true . The percentage increase might be attributed to a fraction of a population.
E.Per capita consumption of fish in Jurania was lower in 1989 than in 1980.
Since , population increased by 6%
and fish consumption by 4.5 %
This has to be true
Per captia consumption of fish = Total consumption of fish/ Total population

_________________
When everything seems to be going against you, remember that the airplane takes off against the wind, not with it. - Henry Ford
The Moment You Think About Giving Up, Think Of The Reason Why You Held On So Long
+1 Kudos if you find this post helpful
Board of Directors
Joined: 17 Jul 2014
Posts: 2551
Location: United States (IL)
Concentration: Finance, Economics
GMAT 1: 650 Q49 V30
GPA: 3.92
WE: General Management (Transportation)
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

14 Mar 2016, 18:55
1
From 1980 to 1989, total consumption of fish in the country of Jurania increased by 4.5 percent, and total consumption of poultry products there increased by 9.0 percent. During the same period, the population of Jurania increased by 6 percent, in part due to immigration to Jurania from other countries in the region.

If the statements above are true, which of the following must also be true on the basis of them?

A. During the 1980’s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.
B. For people who immigrated to Jurania during the 1980’s, fish was less likely to be a major part of their diet than was poultry.
C. In 1989 Juranians consumed twice as much poultry as fish.
D. For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980’s.
E. Per capita consumption of fish in Jurania was lower in 1989 than in 1980.

I could eliminate all but B and E. picked E in the end.
A - profits = revenue - costs. we know revenue increased, but we do not know anything about the costs. so out.
B - most of the increase of population is from immigration. these people consumed more poultry. this might be true, or might not. what if during 1980 to 1989 poultry became very popular as a food? out.
C - we cannot conclude that. the fact that the percent increase of poultry was twice the percent increase of fish does not mean that the poultry was consumed twice as much as fish.
suppose 100 fish and 100 poultry was consumed. at the end of 1989 = 104.5 fish and 109 poultry. as we can see, this one doesn't even make sense.
D - no new relevant information.
E - yes, absolutely. for ex. consumption of fish in 1980 was 1 fish/person. so we had 100 fish for 100 people. in 1989 = we had 106 people, and only 104.5 fish consumed. thus, the consumption of fish per capita decreased.
Intern
Joined: 02 Mar 2016
Posts: 8
Schools: AGSM '18
GMAT 1: 710 Q50 V36
GPA: 3.83
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

15 Sep 2016, 02:56
1
A. During the 1980’s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.

B. For people who immigrated to Jurania during the 1980’s, fish was less likely to be a major part of their diet than was poultry.

It is possible that all migrants preferred fish or poultry, passage doesn't restrict on any of this possibilities.

C. In 1989 Juranians consumed twice as much poultry as fish.

Can not infer anything about amounts because have only proportions

D. For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980’s.

It is possible that both poultry and fish have only 1% of Juranians diet, passage does not restrict on that. -> Can't infer that

E. Per capita consumption of fish in Jurania was lower in 1989 than in 1980.

Let Q be Consuption of fish and P be Juranian population

Q80/P80; Q89/P89=1.045*Q80/1.09*Q80, which is lower than Q80/P80 => E is correct.
Current Student
Joined: 18 Sep 2015
Posts: 72
GMAT 1: 610 Q43 V31
GMAT 2: 610 Q47 V27
GMAT 3: 650 Q48 V31
GMAT 4: 700 Q49 V35
WE: Project Management (Health Care)
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

22 Sep 2016, 06:35
2
"From 1980 to 1989, total consumption of fish in the country of Jurania increased by 4.5 percent, and total consumption of poultry products there increased by 9.0 percent. During the same period, the population of Jurania increased by 6 percent, in part due to immigration to Jurania from other countries in the region.

If the statements above are true, which of the following must also be true on the basis of them?

A. During the 1980’s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.
B. For people who immigrated to Jurania during the 1980’s, fish was less likely to be a major part of their diet than was poultry.
C. In 1989 Juranians consumed twice as much poultry as fish.
D. For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980’s.
E. Per capita consumption of fish in Jurania was lower in 1989 than in 1980."

Data:
- Fish Cons. +4.5 %
- Poul. Cons +9.0 %
- Total Pop. 6%, partly due to imigration

Meaning:
If the the consumption grew by 4.5% and the total population grew by 6% - this means less % people are consuming the fish.

Example: lets say we have 10 people, and 3 people consume fish.
if in 1 year we have 40 people and 4 people are consuming fish, the % fish consumers has decline.

The correct answer E, actualy talk about the (% of people) who consume fish, since it means (# of fish consumers)/(# of people), and since the % change of fish consumers is smaller than the % change of the # of people - we are actualy make the nominator smaller and the denominator bigger- hence E is correct.
Senior SC Moderator
Joined: 14 Nov 2016
Posts: 1334
Location: Malaysia
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

20 Oct 2017, 06:42
From 1980 to 1989, total consumption of fish in the country of Jurania increased by 4.5 percent, and total consumption of poultry products there increased by 9.0 percent. During the same period, the population of Jurania increased by 6 percent, in part due to immigration to Jurania from other countries in the region.

If the statements above are true, which of the following must also be true on the basis of them?

(A) During the 1980’s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.

(B) For people who immigrated to Jurania during the 1980’s, fish was less likely to be a major part of their diet than was poultry.

(C) In 1989 Juranians consumed twice as much poultry as fish.

(D) For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980’s.

(E) Per capita consumption of fish in Jurania was lower in 1989 than in 1980.

F = consumption of fish
P = population of Jurania

$$\frac{F_{89} - F_{80}}{F_{80}}=0.045$$

$$F_{89} = 1.045*F_{80}$$

$$\frac{P_{89} - P_{80}}{P_{80}}=0.06$$

$$P_{89} = 1.06*P_{80}$$

consumption of fish per capita

$$= \frac{F_{89}}{P_{89}}$$

$$= \frac{1.045*F_{80}}{1.06*P_{80}}$$

$$= 0.9587*\frac{F_{80}}{P_{80}}$$
_________________
"Be challenged at EVERY MOMENT."

“Strength doesn’t come from what you can do. It comes from overcoming the things you once thought you couldn’t.”

"Each stage of the journey is crucial to attaining new heights of knowledge."

Retired Moderator
Joined: 13 Apr 2015
Posts: 1685
Location: India
Concentration: Strategy, General Management
GMAT 1: 200 Q1 V1
GPA: 4
WE: Analyst (Retail)
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

19 Feb 2018, 10:57
Question Type: Inference

Argument: 1980 to 1989 --> Fish consumption increased by 4.5%
Consumption of poultry products increased by 9%
Population of Jurania increased by 6%

(A) During the 1980s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish. - Out of scope. Profits are not discussed in the argument.

(B) For people who immigrated to Jurania during the 1980s, fish was less likely to be a major part of their diet than was poultry. - We cannot come to this conclusion as there is a possibility that the immigrants majorly consumed fish and the rest of the population consumed poultry products.

(C) In 1989 Juranians consumed twice as much poultry as fish. - Double the percentage doesn't mean double the number.

(D) For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980s. - We do not know whether they were a regular part of their diet in 1980s. We know only about the increase in percentage.

(E) Per capita consumption of fish in Jurania was lower in 1989 than in 1980. - Correct.

SVP
Status: It's near - I can see.
Joined: 13 Apr 2013
Posts: 1675
Location: India
GPA: 3.01
WE: Engineering (Real Estate)
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

04 Apr 2018, 23:48
Quote:
From 1980 to 1989, total consumption of fish in the country of Jurania increased by 4.5 percent, and total consumption of poultry products there increased by 9.0 percent. During the same period, the population of Jurania increased by 6 percent, in part due to immigration to Jurania from other countries in the region.

If the statements above are true, which of the following must also be true on the basis of them?

Quote:
(A) During the 1980s in Jurania, profits of wholesale distributors of poultry products increased at a greater rate than did profits of wholesale distributors of fish.

We don't know about profits and wholesale distribution.
Quote:
(B) For people who immigrated to Jurania during the 1980s, fish was less likely to be a major part of their diet than was poultry.

Quote:
(C) In 1989 Juranians consumed twice as much poultry as fish.

No such inference can be drawn.
Quote:
(D) For a significant proportion of Jurania’s population, both fish and poultry products were a regular part of their diet during the 1980s.

Regular diet is not discussed.
Quote:
(E) Per capita consumption of fish in Jurania was lower in 1989 than in 1980.

If population has has certainly impacted because population has increased from 1980 to 1989. Correct

POE is worth using on GMAT, and may be most underrated technique still
_________________
"Do not watch clock; Do what it does. KEEP GOING."
Non-Human User
Joined: 01 Oct 2013
Posts: 4365
Re: From 1980 to 1989, total consumption of fish in the country of Jurania  [#permalink]

### Show Tags

07 Apr 2019, 00:08
Hello from the GMAT Club VerbalBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
Re: From 1980 to 1989, total consumption of fish in the country of Jurania   [#permalink] 07 Apr 2019, 00:08
Display posts from previous: Sort by


text:
Relationship between $PGL_2$ and $PSL_2$

I read somewhere that $PGL_2(\mathbb{C})=SL_2(\mathbb{C})/N$ where $N$ is the normal subgroup consisting of $\pm \left( \begin{matrix} 1 & 0\\ 0 & 1 \end{matrix}\right)$. It is unclear to me how this follows from the fact that $PGL_2(\mathbb{C})=GL_2(\mathbb{C})/aI$ where $aI$ are the scalar matrices ($I$ the identity and $a\in\mathbb{C}^*$). However, I did see somewhere the statement that $SL_2(\mathbb{C})/N$ is called $PSL_2(\mathbb{C})$ and that $PGL_2(\mathbb{C})\cong PSL_2(\mathbb{C})$.

Two questions:

1) How does one show that $PGL_2(\mathbb{C})\cong PSL_2(\mathbb{C})$?

2) Is there another (perhaps easier) way of seeing that $PGL_2(\mathbb{C})=SL_2(\mathbb{C})/N$?

Thanks.

-

Hint: If $M \in GL_2(\mathbb{C})$, let $\alpha$ be a square root of $\det(M)$. Then $\frac{1}{\alpha}M \in SL_2(\mathbb{C})$.
Notice that the equality is false over $\mathbb{R}$.
Hints: Given an element $M \in {\rm GL}(2, \mathbb{C})$, you can find a complex number $\lambda$ so that $\lambda M$ has determinant $1$. Note that the image of $M$ is the same as the image of $\lambda M$ in ${\rm PGL}(2,\mathbb{C}).$


text:
# Itemize - set default option

I have plenty of lists, all with the [noitemsep] option:

\begin{itemize}[noitemsep]
\item foo
\item bar
\end{itemize}

Is it possible, to setup itemize to use this option by default? Or do I have to write my own "wrapper" macro around itemize.

-
add comment

## 3 Answers

Try to redefine the list default settings with enumitem. You can use a global option or limit the scope to the environment you want to use:

\documentclass{article}

\usepackage{enumitem}

\setlist[itemize]{noitemsep}

\begin{document}

\begin{itemize}
\item One
\item Two
\item Three
\end{itemize}

\end{document}

-
nice, works for enumerate as well –  mreq Feb 19 '13 at 19:57
add comment

I personally only use enumitem in case there's no other way to do something. You could use the paralist package instead and use the compactitem environment.

-
What's the problem with enumitem? –  T. Verron Feb 19 '13 at 15:32
@T.Verron Simple things require a rather complicated syntax. With paralist you just say what your first item should look like and the package does the rest for you. It has its limits but you don't get all the complexity of being able to define your lists any way you want either. –  Christian Feb 19 '13 at 16:05
paralists compactitem environment also removes the spaces before and after the list -- it resembles enumitems nolistsep option rather than noitemsep. –  lockstep Feb 19 '13 at 16:14
add comment

You could define your own environment:

\newenvironment{newitemize}{\begin{itemize}[noitemsep]}{\end{itemize}}

should do.

-
It seems the OP wanted to avoid wrapper environments if possible. –  lockstep Feb 19 '13 at 16:10
add comment


text:
# Multinomial expansion

Algebra Level 4

What is the coefficient of $$x^7$$ in the expansion of $$\big(1+x+2x^3\big)^{10}?$$

×


text:
# Integral with $\sqrt{2x^4 - 2x^2 + 1}$ in the denominator

$$\int\frac{x^{2}-1}{x^{3}\sqrt{2x^{4}-2x^{2}+1}} \: \text{d}x$$

I tried to substitute $x^2=t$ but I am unable to solve it and I also tried to divide numerator and denominator by $x^2$ and do something but could not get anything.

-

Substitute $u=1/x$ to get $$\int \frac{u^3 - u}{\sqrt{u^4-2u^2+2}}\,du$$ This integral is much simpler, and can be solved by substituting $v = u^4 - 2u^2 + 2$. The final result is $$\int\frac{x^{2}-1}{x^{3}\sqrt{2x^{4}-2x^{2}+1}}\,dx \;=\; \frac{\sqrt{2x^4-2x^2+1}}{2x^2} + C.$$

-
A well-deserved +1 :) –  Chris Taylor Jun 15 '11 at 9:14

The factor of $(2x^4 - 2x^2 + 1)^{-1/2}$ suggests that it might be profitable to look at solutions of the form $f(x)(2x^4 - 2x^2 + 1)^{1/2}$, and hope for a simplification. Indeed, by differentiating this expression we get the differential equation

$$(2x^4 - 2x^2 + 1) \frac{\mathrm{d}f}{\mathrm{d}x} + 2x(2x^2 - 1) f = \frac{x^2-1}{x^3}$$

which can be solved with an integrating factor.

-

Well, using mathematica I can see that this function the given answer is the derivative of the integral.

Consider

\begin{align*} f(x) &= \frac{\sqrt{2x^{4}-2x^{2}+1}}{x^{2}} \\ &= \frac{\frac{x^{2} \cdot (8x^{3}-4x)}{2 \sqrt{2x^{4}-2x^{2}+1}} - 2x \cdot \sqrt{2x^{4}-2x^{2}+1}}{x^{4}} \quad \ \Bigl[ \text{Note this is} \ f'(x)\Bigr] \\ &= \frac{x^{2} \cdot (4x^{3}-2x) - (2x^{4}-2x^{2}+1) \cdot 2x}{x^{4} \cdot \sqrt{2x^{4}-2x^{2}+1}} \\ &= \frac{4x^{4} -2x^{2} -4x^{4} + 4x^{2}-2}{x^{3} \cdot \sqrt{2x^{4}-2x^{2} +1}} \quad \Bigl[ \text{cancelling out x}\Bigr] \\ &= \frac{2 \cdot (x^{2}-1)}{x^{3} \cdot \sqrt{2x^{4}-2x^{2}+1}} \end{align*}

So write your integral as $$\int\frac{x^{2}-1}{x^{3}\cdot \sqrt{2x^{4}-2x^{2}+1}} = \frac{1}{2} \int \frac{\text{d}}{\text{dx}}\biggl(\frac{\sqrt{2x^{4}-2x^{2}+1}}{x^{2}}\biggr)\ \text{dx}$$

Using this you can get the answer.

-

If all else fails, Wolfram Alpha can guide you through a solution step by step, although it is ridiculously complicated. I am sorry, but I do not see the solution immediately.


text:
# Property fourier transform

## Homework Statement

If $$F(k)=TF\{f(x)\},k\neq 0$$ where TF is the Fourier transform ,and

$$F(0)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}f(u)du\neq 0$$ ,

show that

$$TF\{\int_{-\infty}^{x}f(u)du\}=-i \frac{F(k)}{k} +\pi F(0)\delta(k)$$

## The Attempt at a Solution

I attempt the following:

$$TF\{\int_{-\infty}^{x}f(u)du\}=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} \{\int_{-\infty}^{x}f(u)du\}e^{-ikx}dx$$

and , integration by parts, with

$$w=\int_{-\infty}^{x}f(u)du$$

$$dw=f(x)dx$$

give

$$\frac{1}{\sqrt{2\pi}}\{\int_{-\infty}^{x}f(u)du \frac{i}{k} e^{-ikx}\}|_{-\infty}^{\infty} -\frac{1}{\sqrt{2\pi}} \frac{i}{k}\int_{-\infty}^{\infty}f(x)e^{-ikx}dx$$

The last term is

$$-\frac{i}{k}F(k)$$

What should i do with the first?. I do this, but it probably be bad:

$$\frac{i}{k} e^{-ikx}\}|_{-\infty}^{\infty}=\int_{-\infty}^{\infty}e^{-ikx}dx = 2\pi\delta(k)$$

and

$$\frac{1}{\sqrt{2\pi}}\left[\lim_{x\rightarrow\infty}\int_{-\infty}^xf(z)dz-\lim_{x\rightarrow -\infty}\int_{-\infty}^xf(z)dz\right] = F(0)$$

Then,

$$\int_{-\infty}^{\infty}\frac{dx}{\sqrt{2\pi}}\int_{-\infty}^xf(z)dze^{-ikx}=-i\frac{F(k)}{k}+2\pi F(0)\delta(k)$$

where is an extra 2.

I tried to do this problem using convolution, but again i cant achieve the desired result:

$$(f*g)(x)=\int_{-\infty}^{\infty}f(u)g(x-u)du$$

If $$g(x-u)$$ is the Heaviside function, and with $$x-u>0$$ , the convolution is

$$(f*g)(x)=\int_{-\infty}^{\infty}f(u)g(x-u)du=\int_{-\infty}^{x}f(u)du$$

Then,

$$TF\{\int_{-\infty}^{x}f(u)du\}=TF\{(f*g)(x)\}=\sqrt{2\pi}F(k)G(k)$$

But, the fourier transform of the Heaviside function is:

$$TF\{g(x)\}=\frac{-i}{k\sqrt{2\pi}}+\sqrt{\frac{\pi}{2}}\delta(k)$$

Hence,

$$TF\{\int_{-\infty}^{x}f(u)du\}=\frac{-iF(k)}{k}+\pi F(k)\delta(k)$$

But, in the last term appears $$F(k)$$ , and i want to get $$F(0)$$. What is wrong??

Thanks


text:
# Ranarr weed

13,658pages on
this wiki
Release date Unknown edit Yes No Yes No No 15 coins 10 coins Drop Not sold 8,088 coins (info) - 0 kg A useful herb.
[view]

Ranarr weed is a herb that can be cleaned at level 25 Herblore. It is the fifth lowest level herb available, yet is one of the most valuable herbs in the game, as it widely used in the Herblore skill to make prayer potions when combined with snape grass. It can also be combined with white berries to make defence potions, though this is a major loss of money, since ranarr weeds are so valuable.

Due to its value, this herb is often grown by players (with a Farming level of 32) by planting ranarr seeds in the various herb patches in RuneScape. Ranarr seeds are often in high demand, and as a result, planting ranarr for profit is a gamble. However, it is also an uncommon drop from various monsters. One notable monster for dropping this herb is Flesh Crawlers, as they are easy to kill and drop this herb frequently.

## UsesEdit

Clean ranarr can be used to create the following potions:

Potion/item Level Second
Ingredient
XP Effect/usage
Prayer potion

38

Snape grass 87.5 Each dose restores prayer points rounded down using this formula, where x is equal to your Prayer level:$floor(7 + \frac{x}{4})$
Defence potion

30

White berries 75 It boosts a player's Defence level by 10% plus 3 per dose