how to get a feasible solution to dual program from a feasible solution to primal program?

Question: If a feasible solution to a linear programming is known, and the corresponding value of the objective function is close to the optimum, can we get a feasible solution to the dual programming which also reaches a value close to the optimal value, or only the value of objective function, but no solution?  Thanks.
Answer: I don't know what "close to" really means, so let's suppose that you simply did obtain the optimal solution $\vec{x}$.  In the generic situation, the objective $f(\vec{x})$ is a unique linear combination of the inequalities of the original program that are equalities for $\vec{x}$.  The coefficients of that linear combination are the dual solution $\vec{y}$, and the linear combination proves the optimal value of $f(\vec{x})$.  For example, suppose that in two dimensions the constraints are
$$c_1(\vec{x}) = x_1 + 2x_2 \le 1 \qquad c_2(\vec{x}) = 2x_1 + x_2 \le 1,$$
and the objective is $f(x) = 3x_1 + 3x_2$.  Then $f = c_1 + c_2$, and this expression proves that $f(\vec{x}) \le 2$, which is the optimum.  In this example, $\vec{x} = (\frac13,\frac13)$ and $\vec{y} = (1,1)$.
If "close to" means that only the minimum number of constraints are close to equalities, then you can use the same principle.
If many constraints are equalities at the optimum $\vec{x}$, then there are many ways to take linear combinations of them to obtain the objective $f$.  Some of these combinations have non-negative coefficients and some do not.  The coefficients $\vec{y}$ of any non-negative combination are an optimum for the dual program.  Finding a non-negative combination is exactly the question of finding a feasible point in a second linear program that can be anything.  Geometrically speaking, $\vec{x}$ is a vertex of a polytope $P$ of feasible points.  You would like a positive linear combination of the facet equations at $\vec{x}$ to match a supporting hyperplane that corresponds to the objective $f$.  This is a matter of finding a feasible point to a certain problem which is dual to the cone at $\vec{x}$.  This cone can be any convex polytopal cone in principle; so finding $\vec{y}$ is a general linear programming problem.
Answer: The primal feasible point gives you a bound for the optimum value of the dual. Since you have a quasi-optimal primal point, and there is no duality gap, the primal function value at this point is also a good approximation for the optimum value of the dual problem.
But I can't see how this helps you to find a quasi-optimal solution to the dual. I guess it doesn't.
Edit: I just heard of a process calling "pricing out" the primal. Given a basic feasible solution to the primal, define z'=cb'B^(-1), where B is the basis associated to this solution and cb the corresponding basic primal cost. When the primal solution is optimal, the same happens with the dual. The thing is that when the primal solution is quasi-optimal, it turns out that the dual solution is quasi-feasible. I think this is the best notion to associate a dual solution to a primal one.
Answer: Thanks. The "close to" means that the value of the objective function that the feasible solution gives is close to the optimal value of the objective function. In your example, x_1=x_2=0.33 is "close to" the optimum because it is feasible and the corresponding objective value is 1.98, which is close to 2.
The "close to" in the dual case is same.
Comment: You should edit your question or add a comment instead of giving this remark as an "answer".  In any case, my answer applies to what you want; just use all approximate equalities in the program.


Do dogs have something different about their physiology that allows them to pant without hyperventilating?

Question: I was wondering this as I considered how effective panting would be for humans as a means of cooling.
Answer: This article quotes a professor of respiratory physiology that says "dogs are built to pant just right. The mechanics of their lungs and chest set a precise rate for panting that minimizes the amount of work while maximizing cooling power." They also don't breathe fully when panting, so they can still cool themselves without increasing gas exchange. This is different than humans, who will hyperventilate to get rid of carbon dioxide (or you can intentionally hyperventilate and cause respiratory alkalosis).
Comment: What about panting with breaths that are only slightly more than the amount of dead space?
Answer: Not knowing the physiology or the literature, I can say based on personal observations that dogs, even when extremely hot or exhausted, mix in a routine of deep inhales and exhales to their panting.  Perhaps this prevents unwanted side effects of their cooling mechanisms.
Answer: Our physiology is quite different. I guess their larger surface-area tongue is one obvious difference, and the fact that they have limited sweat glands. I actually thought they had none, but this article states that they have them on their feet.
Another fun fact there is that they don't just use panting -- they can apparently  constrict/dilate vessels in their face and ears..


Is there a use for a Hilbert space that uses a different norm than the one induced by the inner product?

Question: $l_1$ minimization / compressed sensing comes to mind. Does anyone have any concrete examples? Or is such a construct completely useless?
Comment: I'm pretty sure that a Hilbert space uses defines its "standard" norm in terms of the inner product. So, once you pick the inner product, you've fixed the norm as just the square root of .  Can you please clarify the question and maybe provide some background and motivation?
Comment: I'm not sure I understand.  If you're using a different norm, what's its relationship to the Hilbert space structure?
Answer: One place where this is used is with Hilbert bundles.  Taking $L^2$-functions on a space generally works very badly, so one instead takes $L^{2,1}$-functions - functions which are differentiable (almost everywhere) with square-integrable first derivative.  However, the transition functions aren't isometries with respect to this norm so one does tend to use the $L^2$-norm on this space, remembering that the fibres aren't complete with respect to the norm.
Another use is in Wiener integration.  Depending on one's point of view, one either has a Hilbert space with a weaker norm, or a Banach space with a dense subspace equipped with a Hilbert norm.  Essentially, having the two norms means that one can "tame" stuff with respect to one norm by using the stronger one.
This extends further to the notion of "rigged Hilbert spaces".
Generally, the idea is that you want to work in one space but you don't have enough control over convergence, so you introduce a stronger norm and then ordinary convergence with respect to the stronger norm implies fantastic convergence with respect to the weaker one.
(I apologise for using vague language, but the question doesn't give much indication of how deep an answer to give.  For those who know a little about ideals of operators, one generally wants the inclusion from the strong norm to the weak to be at least trace class, and often Hilbert-Schmidt.)
Answer: suppe, have you heard of Banach spaces? They're a generalization of Hilbert spaces: they are complete normed vector spaces, but their norms need not arise from any inner product. $l\_1$ is just one example.
I'm sorry if you're already familiar with all that; your question has almost no context, so it's hard to answer appropriately. Your question is confusing because if you're in a "Hilbert space" using some strange norm, then you're really not in that Hilbert space; you're in another normed vector space (possibly a Banach space). You should think of the inner product and its associated norm as being an essential part of the definition of a Hilbert space.
Answer: Firstly, a Hilbert space is complete: the $l^1$-norm is defined on a dense subspace of $l^2$ but not on the whole space. Secondly, if you can equip $l^2$ with another norm, then either this norm is incomplete or (by the closed graph theorem) it will be equivalent to the usual norm.
I think you might wish to try and make your question more limited, but more precise.
Answer: I don't think this is exactly what you are asking, but here's one thing that comes to mind. One could take the Hilbert space $H_0^1(\Omega)$ (the closure of $C_c^\infty(\Omega)$ in the Sobolev $H^1$ topology), where say $\Omega \subset \mathbb{R}^n$ is a bounded open set with smooth boundary. There are two equivalent inner products on this space. That is, if one defines

$$
\|u\|_1 := \int_\Omega (u^{2}+|\nabla u|^{2})
$$
and
$$
\|u\|_2 := \int_\Omega |\nabla u|^{2}
$$

Then by a Sobolov inequality (sometimes called Poincaré's inequality) we obtain two equivalent norms on $H^1_0(\Omega)$ arising from inner products − $\int_\Omega(uv+\nabla u\cdot\nabla v)$ and $\int_\Omega \nabla u\cdot\nabla v$ resp. This type of Sobolev inequality is used extensively by those studying PDEs. If you would like to learn more about this, 1) I'm sure wikipedia offers some basic resources, and 2) there is a decent introductory book by Evans (Partial Differential Equations) - chapter 5. I apologize if this is not what you were looking for and/or if you were already familiar with this.


What is BCS and what can it do for me?

Question: I've been hearing a lot about it but even having Googled the subject I'm not sure what it is or what it can do for me. I believe BDC's could be considered a BCS component? What is BCS?
Answer: Business Connectivity Services!
These are used when you want to pull data from other datasources/external data to SharePoint Environment, by other data source I mean it can be SQL Server database, Oracle, MySQL, Microsoft CRM, Microsoft Dynamics AX, in short anything!
What it can offer to you?
BCS can offer CRUD operations on your datasource using SharePoint forms.. Yes, you heard me! It can use existing SharePoint features like List Forms, InfoPath forms and work with your external datasource!
What are the options available to connect?
[Obviously you need to turn on BCS Services]
Microsoft SharePoint Designer offers you to connect from one of these:

Microsoft SQL Server
WCF Service
.Net Type

When you say WCF Service that means almost all of the external data sources are available which you can access through .Net Framework! Like as I said, you can connect to MySQL or Oracle.. There is no OOB option available but you can write WCF Service which connects to MySQL or Oracle and apply CRUD operations on them and utilize them as BCS connection! Also, there is an option to make your own CUSTOM BDC MODEL
Where to start?
Using SharePoint Designer you can start with making External Content Types, once External Content Type is set up you can generate External List from your External Content Type and the functionality added to External List depends on whatever operations you have defined in External Content Type!
Limitations on External Lists/BCS:
Of course when it offers to connect External Datasource, there are some limitations listed in below:
Business Connectivity Services Limitations
BCS External List Limitations
Other information is available on Internet, this was from my experience :)
Answer: You will get more idea when you will check the following url:
http://msdn.microsoft.com/en-us/magazine/ee819133.aspx
Answer: You should really go for official doc you know, in short BCS enables you to communicate with external system data, but there are various aspect of BCS for which I think you should read some microsoft posts, you will find thousands of article online, here are some to get you started - Overview of Business Connectivity Services, Understanding Business Connectivity Services
Comment: Are BDC's considered a BCS or are the two seperate technologies completely?
Comment: Leaf through the second link of my post (http://blogs.msdn.com/b/sharepointdev/archive/2011/12/26/understanding-business-connectivity-services.aspx) it has the exact answer that you need to know

What is BCS and what can it do for me?


From Archaemennid to Safavid: What Golden Ages count towards the achievement?

Question: Golden Ages started by Great People don't count as far as I can tell. Do all golden ages have to be from Happiness? What about from say Reformation or Rationalism, the cultural GAs?
Comment: This is the "have 6 golden ages" achievement as Persia, right?
Comment: 5 golden ages, but yes.
Answer: The achievement will only trigger on 'natural' golden ages which come from citizen happiness.
Any of the ages which you can trigger yourself, via social policy or great people don't count.
If you are trying to nail the badges, the best solution is to focus on happiness improvements, and grab Meritocracy and Organized Religion.
Answer: After trying a bunch of times to get this achievement, i realized this :
With Gods and Kings expansion golden ages don't occur the same way, comparing with the original game.
In the original Civ V, you have to stack 500 happiness, then 750, 1000, 1250, 1500 etc.
In Gods and Kings, it's 500 and doesn't increase. I think that's the reason why i couldn't get the achievement.
I simply disabled Gods and Kings in the DLC in-game menu, ran a settler difficulty game, and earned (at last) the achievement by starting 5 "happiness golden ages", like stated above.
Hope this helps.
PS: For I don't have Brave New World expansion pack, i cannot tell if it blocks the achievement, or not. If it does, i gess disabling it should fix the problem, like it did for me with G&K.


How to create and submit package for Qt application

Question: I have an application that I developed in Qt and Ubuntu. Its primary target is Windows but I prefer working in Ubuntu for all sorts of obvious reasons, so I rebuild it using Qt under XP and create an installer that can be used in XP, Vista and W7. Given that it's developed under Ubuntu it seemed a logical step to see if I could also distribute it via the Ubuntu Software Centre. The plan would be to make a small charge for downloading.
I registered in the Ubuntu Application Developer Programme, set up a MyApps account for the application and filled in the application details, marking it as to be uploaded later, but I am confused as to what to do next. According to the 'Publish (Uploading your app)' page, Canonical 'provides the packaging service free of charge', but I would welcome clarification on what I need to submit and how.
As I plan to charge for the package it presumably makes sense not to use an open source license, and this seems to imply that there is no need for me to create a Debian source package. Is this a correct assumption? If so, what would be required in the archive file and how should I submit it, bearing in mind that PPAs are for open-source software (unless I've misunderstood)?
As you can probably tell, software packaging is something I have virtually no experience of, so apologies if I'm asking obvious questions. Also, if this isn't the appropriate forum could you suggest a better place to post this query?
Some advice on what to do about dependencies (such as Webkit) would be helpful.
Answer: If it's a commercial application, just build a tarball containing everything needed to run it, and upload it to the myapps site. They'll help you through the rest.
Comment: can you post a clickable link to that site?


how long to cook a turkey per pound

Question: I'm cooking a turkey for thanksgiving for the first time. I've got a beautiful 11 lb turkey and according to the websites I found, I should cook it for about three hours. When I asked my girlfriend's experienced cook mother though, she said that time was really low. Just looking for a second opinion.
Answer: It really depends on the preparation. For example, a brined, pre-thawed turkey would talk less time.
Traditionally, the rule of thumb is 15 minutes per pound and then you start check for mobility in the drumsticks (that indicates it's done). It also takes longer if you've packed the turkey with stuffing/vegetables/etc.
Answer: The best way to know if your bird is done is by checking the temperature of the thigh with a probe thermometer. You're looking for about 160 F. If you don't have a probe thermometer, and you're cooking a turkey, this might be the time to invest in one.
Comment: +1 for the probe thermometer: it is the correct answer regardless of the type of meat being cooked. I put the probe in and set the alarm for a specific temperature, NOT time.
Answer: Since it's your first turkey, I'm not going to tell you to go against a mother, but...
I use the high heat method.  I have already brined the turkey (if you haven't and have some time, soak the turkey in salty water, 1 Cup/gallon of water for 3-4 hours) but that isn't what makes it zip by.
Crank the oven to 400.  Put the turkey in a roasting pan on a V rack, back and legs up (it looks upside down, from all the perfect pictures on magazine covers).  Roast for 30 minutes.  Pull it out, flip it over (be careful, it's hot), rub with butter to help it brown and then put it back in the oven for 50-60 minutes.  Start checking it with a quick read thermometer at 50 minutes.  You are looking for 165 in the breast meat, 170 in the thighs.
Pull it out, put on the cutting board and/or platter, cover with foil and LET IT SIT FOR 30 MINUTES.  Or more.  Don't carve a turkey when it first comes out of the oven.  That is true no matter how you roast it.
I started cooking turkey using the high heat method about 5 or 6 years ago.  It drives my wife crazy because it takes me a couple of hours to have a perfect turkey, whereas when she used to do the cooking "like her mother taught" it took all day.
Answer: I was always told 20 mins / pound + 20 mins.  That works out at closer to 4 hours than 3, I think.  If you stuff it before you cook it then add time on.
Also, something that someone told me recently was that the stuffing should be cold when you stuff the raw Turkey (to prevent it cooking and re-cooking).  I've cooked Turkey for years before this, using stuffing made from boiling water (I'm lazy so I always use the mix) and hadn't managed to poison myself, but the logic behind the advice does seem sound - I just don't follow it myself :-)
Comment: @ what degree would I set the oven???

how long to cook a turkey per pound


Hide controls on a touch enabled device and only show them if someone uses a mouse?

Question: We're building a responsive web site and we're having a discussion about how to display controls on a map. The theory is that people with touch-enabled devices do not need to see zoom sliders because they could and know how to pinch the map. So if we detect if a visitor has a touch enabled device we simply hide the controls. The benefit is a less cluttered interface. Would you recommend this approach? Is there devices out there that support both touch, mouse and keyboard navigation?
Comment: In response to your last question, **Yes, there are**. One example is the [HP TouchSmart Series](http://shopping.hp.com/en_US/home-office/-/static/page-ts?jumpid=re_11260_redirect_Aug12_touch_hho_redirect_redirect), a desktop computer series that features capacitive touch screens as standard and an application suite suitable for that capability. I'm sure there are more other vendors as well.
Comment: There may be some devices which use both/a mixture. I know for a fact that some Android devices support mouse interaction - my Transformer Prime has a mouse touchpad as well as the regular tablet screen.
Answer: I would suggest keeping the sliders even for touch devices.
I was doing some testing recently with someone that has had an iPad for 2 years, and discovered that they did not know that you could pinch to zoom.  I'm sure they are not alone in this.
Also, touch devices are often used by people that are physically unable to pinch to zoom, and who rely on the ability to simply tap on the action they need.  If you take away the controls you then hurt the accessibility of your application.
Answer: Windows 8 has the following behaviour for its Maps app:

Users of touch-only devices never see the zoom controls
Users of non-touch devices always see the zoom controls
Users of hybrid devices such as touch-screen all-in-ones will depend on how the user is currently interacting with the map.

To clarify that last point; Windows 8 enters a sort of "touch mode" once you start interacting with the computer via a touch screen (regardless of the connected hardware), e.g. if you tap your password field on the login screen instead of targeting it with a mouse, it'll show the on-screen keyboard, regardless of whether or not a physical keyboard is connected. Naturally it accepts input from either.
The same thing goes for scrollbars, which are much wider and more familiar on Windows 8 when used with a mouse than with touch only:

So in keeping with that behaviour, Maps changes its behaviour dynamically based on which input device you use. If you enter Maps with touch it will not show controls until you move a connected mouse (in which case they fade in). If you enter Maps with a mouse, the controls start visible and dynamically fade out once you start pinching and zooming. Once they're visible the controls look like this:
Answer: I think it would be a great idea if you could know (for sure) that the device visiting your site is touch only. But that is hard to do, especially when these touch enabled devices are coming to the market.

I'd say - support both methods but don't omitt the controls for mouse users.
Answer: I think that if the users don't need the controls, why waste good real estate. THe whole idea of responsive is that it... well - responded to the user. Devices that have both input options hav a mouse, therefore you need to show it to them. The reason is that if the mouse is what the users is using at that moment, it would be awkward to leave the mouse and start touching the screen and then oging back to the mouse.
What you will lose in this option is the affordance of the pinch
Maybe you can detect earlier whether the user is using a mouse or not, and then assume that htis is her favorite manner of input at that moment


Is every encryption a bijective function?

Question: Is there any encryption algorithm that is not bijective function ?
Should an encryption always give the same result given same key ?
Comment: [Probabilistic Encryption](https://en.wikipedia.org/wiki/Probabilistic_encryption) : the first provably-secure probabilistic public-key encryption scheme was proposed by Shafi Goldwasser and Silvio Micali,
Answer: Formally a (symmetric) encryption function is a function $E$ from $\mathcal{M} \times \mathcal{K}$ to $\mathcal{M}$, where $\mathcal{M}$ is a message space (here we use, for convenience, the same for cipher and plaintext) and $\mathcal{K}$ a keyspace. For a fixed $k \in \mathcal{K}$ we want $E(.,k)$ to be a bijection from $\mathcal{M}$ to $\mathcal{M}$: this just means every message has a unique encryption under the key $k$ and every message can be decrypted too. (There are also notions of randomized encryption, etc., but this is the simplest model).
For algorithms like RSA, or cipher modes like CBC, it is true that one message, under  one key, has multiple encryptions, but the decryption should always be doable in a unique way (we can filter out, so to say, the randomness we have added as an extra ingredient in encryption). It's necessary in assymetric cryptography (like RSA) in order to have a secure system, and most likely in symmetric systems too. It avoids some attacks that would exist otherwise.
[edit] To give an example, for RSA we use a large key (say a 1024 bit modulus $n$, with some encryption exponent $e$ ), so we can encrypt stuff that has size around 128 bytes (a bit less, because we consider numbers $x < n$ as messages, that can be encrypted as $x^e \mod n$). Now, if we have a message (like, say "Hello", or some 16 byte key we want to use for later communications, as RSA is often used, but say we use "Hello", in its ASCII encoding (hex) 48 65 6c 6c 6f and we want to send that as a message, we could use the string, as a big number 0x48656c6c6f which is less than $n$ (I won't give an example, but recall we chose it of size 128 bytes), so we could just encrypt it, and decrypt it uniquely. However, this leaves an attacker (who also knows $n$ and $e$, so could do the same encryption) with the option of trying out the encryption (under this key) of all words in a dictionary and so find the message, without really breaking RSA. So in practice (this is a commonly used standard; other exist but are harder to explain), we generate a number $x$ from the message by forming a 128 byte number as follows: first a byte 0x00, then a byte 0x01, then 120 random non-zero bytes, then again a byte 0x00 and then the message 0x48 65 6c 6c 6f (5 bytes), in total a number of 128 bytes, that starts with 0x00 to ensure it's less than any $n$ of that size 128 bytes and this is the $x$ we use to compute $x^e \mod n$. After decryption (uniquely, by doing another exponentiation) we strip off the random bytes (all non-zero, so we know the original message starts after the first 0x00 after the initial one. This way, the attacker cannot precompute all possible ciphertexts for a given plaintext. This is called "padding the message", and the standard requires at least non-zero random bytes.
So in a way, decryption is still unique, but we made sure that the possible ciphertexts (as number less than $n$) are not all possible such numbers, only the ones we get after a valid padding. The "actual", intended message is shorter. So RSA as a function is a bijection, but as a "real message" to "ciphertext" mapping it is not a real function. It will be if we add the randomization as a factor: given a message, a random number (for padding) and a key, the result is still uniquely decipherable, and we can, given a key, separate out the message and the randomness. But note that that we changed the encryption function a bit: message space and ciphertext space are different now, and this has added security value. The disadvantage is that we cannot directly encrypt any string anymore. But in practice, only small values are encrypted under RSA, which are then used as a new key for a faster algorithm.
For an example of this in symmetric crypto, look at cipher modes like CBC wikipedia link that also expand the ciphertext by an extra IV block to get more than one possible ciphertext for a single plaintext.
Comment: So the answer is YES given the same key ?
Comment: for the simplest systems, yes, for real life systems most often no.
Comment: could you give me an example with "NO" ? if an encryption can give two different results given the same key or 1 cipher text can come from 2 different encryption, how could it be decrypted ?
Comment: Given the key, the decryption should be unique. I'll edit to give an example.
Comment: I think his point is that modern encryption isn't even a true function, but a "set-valued"/multi-valued function.
Answer: Encryption algorithms will not be surjective if you want to have a checksum feature.
(A checksum can be detect submission errors. For example you can add a digit that makes the number divisible by 9. If you receive a number that is not divisible by 9, you know that there has been a transmission error.)
I am not sure about your second question. Of course, the encryption can vary by time, but maybe this is not your question.
(If the encryption varies by circumstances this can also be viewed as a key change, but I note that there are very simple "encryption" systems that are not injective. For example, the word "lead" encodes very different meanings that have to be reconstructed from context. This problem is also very present for alphabets without vowels.)
Clearly, if you construct modern encryption algorithms you will want to have an injective function, but there are situation (like some hash functions) where people are satisfied that the function will be almost always injective in practice.
Comment: could you explain more ? what is checksum feature ? If encryption with same key can give 2 different results, how can it be decrypted ?
Answer: An encryption algorithm which is not guaranteed to give the same result for the same inputs (i.e. encryption key and message) is certainly possible. In fact, the initialisation vector for chained block ciphers is usually random, but we usually consider it as one of the inputs because for a fixed encryption key and initialisation vector, the algorithm will be deterministic.
As such, an encryption algorithm is not necessarily a well-defined function, in the mathematical sense. Nonetheless, it is essential that under no circumstance the algorithm map two different inputs to the same output — otherwise decryption is impossible. So, if the encryption algorithm is deterministic, it is at least an injective map. Moreover, if the decryption algorithm can accept any string as a ciphertext, then the encryption algorithm must also be surjective, and in this situation it is bijective.
Comment: so If I add in that the plain text and cipher text domain is any string and the encryption function including any other inputs ( key, IV ..) except plain text. The answer should be "YES" ? How could an encryption algorithm is non-deterministic algorithm? Is there any example ?
Comment: Yes, given the rest of the encryption scheme data, the mapping from plain to cipher and back is a bijection, between appropriate sets, see the RSA example.
Answer: "Should an encryption always give the same result given same key ?"
No.
If the ciphertext message is ever the same, then the system is vulnerable to replay attacks.
You probably already know several encryption algorithms that,
if you cipher the same plaintext with the same key, always deterministically produce identically the same ciphertext.
There are many encryption algorithms (some listed below) that,
if you cipher the same plaintext with the same key a hundred times, will (almost certainly) produce a hundred different ciphertexts.
If you decrypt those 100 ciphertexts with the right key and the appropriate decryption algorithm,
they will all produce a perfect copy of the original plaintext.
These cryptosystems generally have the transmitter pull numbers from a random number generator,
and somehow transmit those random numbers to the receiver inside the ciphertext message.
Given exactly the same inputs -- i.e., the random number generator is broken and produces exactly the same bytes again, a bug in the software lets you keep using the same key even after the message counter rolls over to zero, and we use the same key and plaintext message -- these cryptosystems would produce the same ciphertext message.
symmetric ciphers with an IV
Every cipher that uses an initialization vector
will encrypt the same plaintext in many different ways.
(They are not bijective).
Typically the ciphertext is composed of a random initialization vector (sent unencrypted)
concatenated with the encrypted data (generally the same length as the plaintext, or rounded up to a full block).
The initialization vector is freshly generated for every message.
(With TKIP and CCMP, the IV is a simple counter -- the TSC;
with some other encryption algorithms, the IV is freshly pulled from a random number generator).
The initialization vector is
10 bytes for CipherSaber, 3 bytes for Wired Equivalent Privacy, 6 bytes for TKIP, 6 bytes for CCMP, etc.
public-key ciphers
Hybrid cryptosystems encrypt the same plaintext in many different ways.
(They are not bijective).
PGP, GPG, SSL, TLS, SSH, etc. use hybrid cryptosystems.
The ciphertext message is composed of an encrypted temporary key
concatenated with the encrypted data (generally the same length as the plaintext, or rounded up to a full block).
The temporary key is freshly pulled from a random number generator for every message.
So the same plaintext message, sent at another time,
will almost certainly be encrypted with a different temporary key
and so almost certainly will generate a different ciphertext message.
The plaintext message is encrypted with a symmetric cipher using the temporary key.
The temporary key is encrypted with a public-key cipher using the public key of the recipient.
Answer: Here is a solution, given many cases.
 Symmetric Key Ciphers
 Encryption Alone
No, at least not encrypting under the same key. If E(k1,u) = E(k2,u) then it would not have a receiver would be confused on which one.
But with different keys this would be impossible. If M is the message space and K is the key space, E: M x K -> M. But the space of all possible (M,K) is bigger than M, so this is impossible.
 Encryption with an IV
 Now, we have a similar argument: EM : (M,K,I) -> M, but the set of all (M,K,I) is larger than M. Bijective functions using modes like CBC and other IV-using modes (almost all of them) cannot exist.
 But with the same key, encryption is still influenced by the IV, making it still non-bijective. Same with same IV but different key. But if the we have the same key and same IV, unlike encryption alone, this is non-bijective.
 Non-symmetric key ciphers
See the arguments from "encryption with IV", because there are three arguments: Message, Private key, Public key.


The importance of parallel arrows in a commutative square

Question: I noticed that whenever there is a commutative square, the relation it imposes on parallel morphisms is usually very important (e.g. natural transformations, pullbacks). In contrast, there's usually almost nothing to be said about the consecutive morphisms in these diagrams, even though the equation expressed by the square directly involves their composition. Is there a conceptual explanation for this in general?
Comment: Commutativity says that it does not matter which of the two paths you follow. However, this makes no statement about where your intermediate stops are on the two paths. Saying that going from London via Oslo to Moscow fulfills the same travel purpose as going from London via Rome to Moscow (e.g. you can personally transmit greetings from Buckingham Palace to the Kreml) can hardly say a lot about the relation between Rome and Oslo. In fact, Naples or Stockholm might be just as nice.
Comment: @HagenvonEitzen you don't say...
Comment: exact sequences are a special type of useful consecutive.
Comment: @sunflower fixed.
Comment: @HagenvonEitzen Excellent metaphor!
Comment: As far as I know, the term *parallel arrows* is reserved to arrows sharing the same domain and codomain. In this sense your title - as it stands - is a bit misleading. I would suggest changing it to something like: "The importance of commutative squares", which imho better describes your question/interest.
Comment: You need to explain your question better if you find Hagen von Eitzen's explanation lacking.
Answer: This is an interesting observation , but imho this is a case where there is less than meets the eye. Commutative squares by themselves do not really say much more about the constituent arrows - or pairs of arrows - than their commutative relation already says. In particular your examples - natural transformations and pulbacks/pushouts - derive their interest because of other/extra conditions imposed on the squares.
Take natural transformations:
the real noteworthy fact is that you can build a commutative square for all pairs of objects in the domain category. In itself a single square is not that special. It is like saying: a single puzzle tile means nothing, it is not even a rectangle, but taken together in a special way, the whole collection of tiles has the remarkable property of forming a rectangular puzzle.
Same with pulbacks/pushouts: the real interesting thing is the the universal property.
Not convinced yet? Ok, let's dig deeper.
Take a very special commutative square: a commutative triangle.

It can be interpreted as either one of the following commutative squares with identity morphisms:

where $\text{Id}_X^{\mathbb{C}}$ stands for "the identity morphism of object X in category $\mathbf{C}$"
(Please see comment below for more info on these diagrams)
Now: in the first square, f is parallel with an identity - which is a very special morphism: iso, mono, epi... What insight can we get from this? None! f can be anything.
Same story with g in the other diagram.
Conclusion: the importance of parallel arrows in commutative squares? In general...none
Comment: The above diagrams were composed with my package WildCats http://wildcatsformma.wordpress.com/ . It is a freely available category theory package for Mathematica from Wolfram Research
Answer: I think you have hit upon an important idea.  We don't know the general story yet.  But my feeling is that the commutative squares (for naturality, for instance) are drawn in a particular way for a good reason, which is unfortunately not captured by the theory.  In particular, the arrows drawn horizontally play a different role from those drawn vertically.  The horizontal arrows play the role of "functions", i.e., map inputs to outputs, whereas the vertical arrows play the role of "relationships", i.e., something upstairs is related to something downstairs.  Naturality says that all "relationships" are preserved by "functions".
In Computer Science, we work with a concept called relational parametricity, which is more general than naturality, where "functions" and "relationships" are decoupled from each other.  We don't talk about "composition" of functions with relationships, but use more general axioms of fibrations to relate the two.  When "relationships" are specialized to "functions", these conditions do boil down to using composition of morphisms.  These are very intriguing facts, and it would be great for more people to get involved in investigating them.
The foundational article on relational parametricity is Reynolds: Types, abstraction and parametric polymorphism.  The categorical axiomatization I am talking about may be found in Dunphy and Reddy: Parametric Limits.


How does learning enchants from disenchanting work?

Question: I just disenchanted an item with +50% magicka regen and +12% destruction spells but only ended up learning an enchantment with +10% magicka regen and +5% destruction. The same thing happened for similar items: the enchantment I gained was significantly diminished. How do I get closer to what I had before? Do I have to disenchant more of the same item?
Comment: It only scales the first value for me too. It has to be a bug!
Answer: When you disenchant something, you're not getting a percentage of the enchantment you learned. What you're getting the ability to use that enchantment: in essence, the base enchantment upon which you built better ones.
So it doesn't matter what your skill is when you disenchant an item or how big of a bonus the enchantment on that item has: you'll always wind up with the same base enchantment to start off with.
Instead, what matters is the size of the soul you use, any perks you have, and your enchanting skill when you go to enchant an item: larger souls and more enchanting skill results in better enchantments placed on items.
Comment: Yep and the damaging abilities, also have a charge... you could for example have do 10 frost damage to stamina and health on a weapon. Dissenchant it and then you can set the enchant: Like 1 damage to stamina and health is for example 150 charges while 10 damage is like 9 charges...
Comment: Perks help too.
Comment: how can you set the enchant though? Every time I disenchant something it just gives me the base enchant and not the option to set it?
Comment: Cjones - You get the option to set it while applying the enchantment.
Comment: It gets really annoying when you realise you just added a +1 health bonus.
Answer: I just got level 100 enchanting last night and found that with this specific enchantment (+5% destruction, +10% magicka regen) it only scales up the FIRST skill and not the second.  So I got 17% destruction cost but still +10% magicka regen.  I think this is a game bug because there are two stats and is really game breaking for me at the moment.
Answer: I don't necessarily agree with Mark's answer that you "always wind up with the same base enchantment to start off with".
For example, I disenchanted a ring of smithing that gave an 8% bonus, and now 8% is always the starting point whenever I want to enchant a new smithing item. At the same time, I disenchanted an item that gave a 12% sneak bonus, and so 12% is always my base for sneak enchanting.
This means that with my curent Enchanting level of 74, and with 3/5 enchantment perks, my smithing enchanting maxes out at 15% bonus, while sneak maxes out at 20% (using a black soul gem, filled grand for both).
So, to me it seems like the higher your enchanting level is when you learn an enchantment (and perhaps a higher percentage bonus on the item you are learning from) will net a higher base percentage for that particular skill.
In line with Bilge's initial question, the game won't let you "re-learn" a skill. So, by my example, if you learn a skill at a low percentage early in the game when your level/perks are low, you will be stuck with that percentage as a baseline for the rest of the game. Again, even if you find an item with a higher bonus percentage, the game won't let you disenchant the same skill twice...so you're SOL at that point.
This is how the game is working for me. Anyone else seeing similar? Perhaps this is a result of the latest patch? I'm playing on a 360.
Comment: Totally not how it works on the PC.
Comment: I'm with you Andy. I think the higher the base value of what your enchanting is, the higher it will become in the end. This is my second playthrough and I'm only disenchanting the highest stuff I can find. Compared to my first character, my new character can already enchant better and he's still only level 39 instead of 80...
Comment: The base level is different per enchant. It has nothing to do with the level on the item you disenchanted.


Is there a way to sample metallic paint?

Question: I have some color swatches from a local car dealer that are about 8.5" by 11" and the paint samples are metallics.  Is there a way to scan these metallic color paint samples sheets, then use a large sample brush to get the metallic "texture" and be able to add it to my color swatches?  That way if I want to do a metallic blue, red, silver, green, or whatever label background fill... I can use the bucket fill or maybe save it as a brush or texture?  Using CS4 Photoshop.
Answer: No, you can't. The reflective nature of metallic paint is due to little particles suspended in an otherwise flat color. Light bounces off these particles in different directions creating a unique look that can't be reproduced by using a paint brush.
You could simulate metallic paint by adding noise and playing around with different layers and gradients to mimic light shining off a glossy paint surface. Once you develop a process you can refine it and document the steps to reproduce later. You might be able to create a pattern for your noise and a style for your gradients (if you use layer effects) that can help make the process easier to replicate.
Answer: Metallic paints don't reproduce all that well on computer screen, since the real life effect is all about the little reflective chips embedded in the paint and how they change the color depending on the ambient light. Since there is no viewing angle or lighting in basic bitmaps, the end result is usually pretty dull.
You can scan the swatch, and use the Eyedropper tool with a larger sample size to get the average color, but in the end it's just one color.
Scanning the swatch as a texture would give you an image that has the base average color, with some luminosity noise, or it would show the metallic chips if there is enough resolution. But it wouldn't be near as attractive as it is in real life. Try googling "metallic paint texture", that's about as good as it can get.
Here's more about creating the texture, if it is sufficient for your graphics needs.
Comment: Actually... I've been playing with layers in different colors and transparency levels then adding noise and gradients... I'm getting somewhat close to something that is acceptable.
Comment: @user7363 If you find out a fancy method for doing it, do add an answer here, I'm definitely curious. :-)
Answer: You can't really accomplish this per-se, but you can get a very similar sort of look sometimes if you take a large sample with the eyedropper to get an approximate color, then add noise and use a very low radius gaussian blur on the noise to get a semi-reflective looking texture, but it's never going to completely match the original sample. This process is usually more trouble than it's worth and kind of time consuming while you're fiddling with the noise and blur. I wouldn't bother unless you absolutely have to get the closest match you can get for a client or something and they don't have any other resources to give you.
Answer: I'd suggest you scan the samples, then extrace a greyscale-version of the metallic differences (i.e. what makes it look not solid), transform that into a seamless pattern, and then, finally, you can create a layer style with color-overlay and patter-overlay (with multiply) and apply that layer style wherever you want the metallic color look.
Answer: It is impossible to scan metallic surfaces. This is because its reflective property is converted to luminance. There is no way around this.
You can always simulate the effect in post or get a snapshot of the surface in a natural environment where our brain can accept the light conditions and so forth. But to register reflectiveness by the means of scanner, camera etc. is not possible.
(You can do a better simulation by using a 3D application with a robust material editor).


Are third-party alternatives to the Canon 70-200 f/2.8 worth the price savings?

Question: Has anyone used the 3rd party 70-200 lenses?
Are you happy with the quality, or do you wish you had saved up for longer and got the Canon?
Answer: Personally I have a 70-200 2.8 IS.   Yes it cost a lot, and yes it is heavy,  but the results from it speak for themselves.
But having said that, you need to pick a lens that is going to meet your needs (i.e. what sort of photos you plan on taking with it).  I have a friend who uses a 70-200 F4 (non-IS) and is very happy with the results. Likewise I know someone who has a Sigma Bigma (50-500) who produces good results.
One resource you may find useful is Fred Miranda Reviews which agregates the results from people submitting reviews about the lenses they own.
Comment: @Alan: The EF 70-200mm f/2.8L IS II is sharper and more consistent across the entire range than the f/4 versions. The original f/2.8 IS was not.
Comment: I vote for the canon 70-200 2.8 IS... worth it.
Comment: From everything I've read the 70-200 F4 IS is the best of the bunch in every regard (save for the F4 aperture). I had the 2.8 IS, but sold it to get the 16-35F2.8 II.
Answer: I have a Tamron 70-200 2.8. It gets the job done and I've used it plenty for stage photography, but I always wish I forked over that little bit extra for the Canon. My particular lens always hunts and has problem with moving the autofocus motor.
Answer: I have the Sigma 70-200 (pre-IS), although Nikon mount, and I quite like it.  Super fast focus, seems pretty sharp.  Build quality is top-notch on mine.
Answer: I always go with first party lenses, only because of one silly issue:
The Canon's EOS lens system is proprietary. In order for 3rd party lenses to work, the manufacturers have to reverse engineer the communication protocols. There have been cases where older sigma lenses were not compatible with newer canon bodies. Sigma will happily "chip" older lenses to fix the issue (for free IIRC), but it's somewhat of a hassle.
I ran into a similar issue with my Sigma DG Super 500 flash being incompatible with my 5D2. Sigma will flash it, but I bought a Canon 580 EX II, and just use the Super 500 as a slave.
FWIW, I have read a few rumors that Canon secretly licenses their protocol to Tameron, but it was only a rumor.
Comment: The landscape regarding third party lenses has changed a bit now that Sigma and Tamron sell USB docks that allow the end user to update their latest lenses' firmware themself.
Answer: I've used third party lenses when the quality was as good as or almost as good as the Canon lenses. One of the favorite lenses I've ever owned was the Tamron 17-50mm f/2.8 Di II. It served me well on APS-C bodies at less than 1/2 the price (at that time) of the comparable Canon EF-S 17-55mm f/2.8 lens. That lens and my old 50D were made for each other! The color was a tad less saturated and cooler than most Canon lenses, but since I shoot RAW pretty much all the time that was easily accommodated in post. And sometimes you want cooler and less saturated. The focus motor did make a unique (to put it mildly) sound, but it was fast and very accurate.
On the other hand, I thank myself for making the right decision and spending the extra greenbacks every time I shoot with my EF 70-200mm f/2.8L IS II USM. As of 2013, there is no other lens available, at least for a Canon mount, like it. From 70mm to 200mm. From f/2.8 to f/16 and beyond it approaches and sometimes equals the quality of comparable prime lenses. This is the first zoom I've ever used that doesn't have a soft spot at one end or the other (or in the middle), or a CA problem at a particular aperture and focal length. It just works as it should!
When Canon introduced the EF 70-200mm f/2.8L IS II USM a few years ago it was proclaimed by many to be the best zoom available. It was the first of several updates Canon has rolled out using supercomputer aided design and evaluation to produce lenses the best designers in the world only dreamed of creating less than a decade ago. Since that time they have done the same thing with many of their "Super Telephoto" collection. The new EF 24-70mm f/2.8L II performs even better at its designated focal lengths than the EF 70-200 f/2.8L IS II does. The Tamron 24-70mm f/2.8 Di VC that was introduced about a year ago is a little better optically than the original EF 24-70mm f/2.8L, but it doesn't compare to the II. For one half the price it comes close enough for a lot of folks.
In the end, everyone has to decide for themselves what the relationship is between "close enough" and "good enough", and how much the difference, if there is any, is worth.


Why forgetful functors usually have LEFT adjoint?

Question: for forgetful functors, we can usually find their left adjoint as some "free objects", e.g. the forgetful functor: AbGp -> Set, its left adjoint sends a set to the "free ab. gp gen. by it". This happens even in some non-trivial cases. So my question is, why these happen? i.e. why that a functor forgets some structure (in certain cases) implies that they have a left adjoint? Thanks.
Answer: Forgetful functors usually have a left adjoint because they usually preserve limits.  For example, the underlying set of the direct product of two groups is the direct product of the underlying sets, and similarly for equalizers (that gives you all finite limits).
However, functors that preserve limits don't have to have left adjoints, because once in a while what you want to do to construct a free object results in a proper class.  An example is complete lattices.
Freyd's Adjoint Functor Theorem gives a necessary and sufficient condition for a limit-preserving functor to have a left adjoint.  The proof and related results is discussed in section 1.9 of Toposes, Triples and Theories.
Comment: Forgetful functors usually preserve limits because they are usually representable.
Comment: In fact, if the forgetful functor is $\mathsf{Set}$-valued, then it has a left adjoint if and only if it is representable. For base categories other than $\mathsf{Set}$, it's not quite so clear what it means to be representable.
Comment: When forgetful functors have left adjoints, those left adjoints will be the minimally required adjoints one can obtain: free constructions. The only properties that will hold are those who follow from the axioms of the free constructions (if my understanding is correct)
Answer: Not every forgetful functor has a left adjoint.  If you take comodules over a k-coalgebra A, the forgetful functor to k-modules has a right adjoint, not a left adjoint.  So you have cofree comodules, of the form A tensor_k V, but in general no free comodules.  So I would argue that forgetful functors will have left adjoints when your structures are defined by maps into your object (like A tensor M into M), but right adjoints when your structures are defined by maps out of your object (like M into A tensor M).  This is a universal algebra-style answer, not perhaps so helpful for non-algebraic situations.
But let me point out that the forgetful functor often has both adjoints in non-algebraic situations.  For example, the forgetful functor from topological spaces to sets has left adjoint defined by the discrete topology, and right adjoint defined by the indiscrete topology.
Comment: I guess a more opaque way to answer the question along these lines is to say that forgetful functors usually have left adjoints because we (meaning mathematicians in general) usually work with monadic algebraic structures.
Answer: Many standard examples of algebraic "forgetful" functors $U : C \to \mathrm{Set}$ have the following form:

$C$ is a presentable category, i.e., there is a small category $I$ and a collection $S$ of cones of $I$ such that $C$ is equivalent to the full subcategory of functors $I \to \mathrm{Set}$ consisting of those functors which send the cones of $S$ to limit diagrams in $\mathrm{Set}$;
$U$ is evaluation at an object $u \in I$.

For example, if $C$ is the category of monoids, take $I = \Delta^{\mathrm{op}}$ so that functors $I \to \mathrm{Set}$ are simplicial sets and choose $S$ so that the objects of $C$ are those simplicial sets $X$ such that $X_0 = \ast$ and $X_{i+j} \to X_{i} \times X_{j}$ is an isomorphism (where this map is induced by the inclusions of the first $i+1$ and last $j+1$ elements of an ordered $i+j+1$ element set).  The object $u$ is the two-element set $[1]$.  (One actually needs only the full subcategory of $\Delta^\mathrm{op}$ on the objects $[0]$, $[1]$, $[2]$, $[3]$, and the cones involving these objects; expanding this gives a possibly more familiar presentation of the notion of monoid.)
In these cases (which include models of any essentially algebraic theory) the existence of a left adjoint is guaranteed by the theory of presentable categories.  Indeed, the inclusion of $C$ into $\mathrm{Set}^I$ has a left adjoint which we compose with the constant diagram functor $\mathrm{Set} \to \mathrm{Set}^I$ to obtain a left adjoint to $U$.  See Adamek and Rosicky, Locally presentable and accessible categories, for an excellent introduction to the subject.
Answer: The term "forgetful functor" is not perfectly well defined.  Depending on context, I've seen it defined as "faithful functor with a left adjoint", because most notions of "Forget" should have a corresponding notion of "Free".
Edit:  I should emphasize that there are many notions of "forgetful functor", and it is not a canonically-defined word.  J. Baez has thought about what the right notions of "forget" are.  For him, a functor "forgets at most properties" if it is full and faithful, "forgets at most structure" if it is faithful, and "forgets at most stuff" if it is (empty list).  I think it is not necessarily true that a full and faithful functor has a left adjoint.
Comment: agreed.. so far, I haven't seen any reference that really rigorously defines what is category-therotically meant by a "forgetful functor".
Comment: I don't think I've ever seen it defined as such, but it has surely been strongly hinted at.
Comment: I strongly object to the notion that a forgetful functor ought to be faithful, and I also strongly object to the notion that a forgetful functor ought to have a left adjoint...
Answer: Many forgetful functors in an algebraic setting are representable; for example, the forgetful functor $\text{Ab} \to \text{Set}$ is represented by $(\mathbb{Z}, 1)$.  Functors with left adjoints are also representable, and sometimes the converse holds.
Answer: the answer of reid barton is perfect and general. for categories of $\tau$-algebras, where $\tau$ is a type (thus consisting of function symbols and identities), we also have the following: let $\tau \to \sigma$ be a homomorphism of types, then there is a functor from $\sigma$-algebras to $\tau$-algebras and it has a left adjoint. this can be proved using freyd's adjoint functor theorem. this yields tons of examples:

the forgetful functor of $\tau$-algebras to sets has a left adjoint. in particular, free monoids, groups, modules, lie algebras etc. exist.
if $R \to S$ is a ring homomorphism, $S-Alg \to R-Alg$ has a left adjoint.
every ring has a free unital ring.
forgetful functors of algebra may be seen as the functors from $\sigma$-algebras to $\tau$-algebras, where $\tau \subseteq \sigma$ is a subtype; these have a left-adjoint. for example, from groups to monoids, from rings to abelian groups, from R-algebras to R-modules, and so on.

basically, it's all about representing functors, and since subobjects of Set are well-behaved in a certain sense, freyd's adjoint functor theorem tells you that you can do everything you want.
Answer: I think the "left adjoint"/"right adjoint" thing is mostly just terminology, although probably now that I've said that someone's going to point me to a n-Cafe post or a SBS where they explain that it's deeply tied to TQFT or something.
I asked a question a couple weeks back, the answers to which helped me understand why so many functors did have left adjoints.
Comment: Erm, I meant that, as far as I know, the reason we call left adjoints left and right adjoints right is basically entirely historical and has much more to do with arbitrary mathematical notation than any real difference between them. (I mean, yes, they're different, but not *that* different.)
Comment: In what way do you mean "mostly just terminology"?  As Mark Hovey's topological example (an exercise in MacLane, also) points out, one may have both a left and a right adjoint which are _clearly_ distinct.
Comment: If you're just talking about the adjectives left/right, well .. that's terminology, sure, since you're talking about .. terms.  There was some usage historically of "adjoint"/"coadjoint", but it's unnatural AFAIAC to say that one is in the "correct" (I guess I have to avoid the word "right" here) direction.  However, we do have "unit"/"counit", so it wouldn't be a stretch to associate "adjoint" with "unit", and co-.  I think this isn't done mostly because it was historically not used consistently this way (or that's what I gleaned from a comment in MacLane).


Backpacking in Pärnu in the summer

Question: Are there any (backpacker) hostels in Pärnu, the "summer capital" of Estonia? If not, how about cozy B&Bs or guesthouses... or well, anything other than big hotel / spa complexes?
I'm more interested in the social vibe etc of backpacker places rather than solely budget lodging, but while at it, does anyone know what's the general price level for a room/bed in Pärnu (budget / midrange; nothing fancy)?
Wikitravel is not very generous when it comes to Pärnu accommodation. But there should be something for backpackers in the city, according to sites like visitestonia.com anyways... :-)

Pärnu has something for everybody - families, backpackers, youngsters,
  romantic couples, sports enthusiasts, people interested in culture and
  art - you name it! There's always a reason to revisit Pärnu.

Also, at the height of the summer, can you generally find any place to stay in Pärnu without reserving a long time beforehand?
Answer: Of course there is!
Hostelbookers  currently lists three properties for Parnu.  A hostel, a guesthouse and a motel.
Surprisingly (they normally overlap), Hostelworld has three different properties - a guesthouse, campsite and hostel.
Hopefully some of those appeal, although they don't appear terribly big, so it'd pay to book in advance.  Hostelbookers also appears to have a summer sale on at present.

Backpacking in Pärnu in the summer


Options for tuning 5-string bass?

Question: Of course there's the familiar BEADG and EADGC tunings, and I've seen some people use DEADG before so they don't have to detune for a drop D (basically using it as a 4-string otherwise).  One that I've had fun with some times is DEADA or BDADA, which makes octave riffs dead simple (pardon the pun).  Are there any other common/useful tunings for 5-string?
Answer: Depends what you want; for the real heavy stuff you could drop DEADG down a full tone to CDGCF.
Or you could tune it to a chord like E major perhaps [E B E G# B], or flatten the third(G#) to make it an E minor [E B E G B].
You can tune to pretty much any chord which takes your fancy; however bear in mind that tuning to a chord may restrict your options and lock you into a specific key signature;
Answer: actually i would so recommend using BEADG it will even suites when rehearsing with the band, or playing over with a song you want to practice, what type of music do you listen to?
Comment: Got my start doing Black Sabbath and Iron Maiden, but I'm interested in moving more towards the jazzier end of things (e.g. Al DiMeola)
Comment: your style would perfectly suite BEADG go for it man, if you would you like to go more deeper in playing complex bass line trying listening to progressive metal such as Dream Theater and Symphony X Good luck dude.
Answer: When I started playing with a band that played in drop D I didn't want to give up the low growl of the B.  So I tuned my 5 string from low to high BDADG.  Don't know how common it is, but I really like it.
I do know the chapman stick tunes its 5 bass string in 5ths.  So from low to high it would be CGDAE.
Answer: Five string double basses in symphony orchestras sometimes are tuned CEADG, with the idea that the lowest C corresponds to an octave below the celli's lowest note. However I beleive this is 'old school' and most players today use the BEADG tuning.
(Some four string symphony orchestra double basses has a 'drop-C' neck extension feature on the E string.)
(Some double bassists tune their four strings in fifths - CGDA - like the cello but one octave down. For instance jazz bassist Red Mitchell.)
Answer: The Chapman Stick is an instrument with the same scale length as a bass guitar, and its bass strings are usually tuned in 5ths, such as C G D A E, like a cello one octave lower.
Bass guitar soloist Michael Manring has used a range of alternate tunings for different pieces. On his Zon Hyperbass, he has a variable, calibratable "D-tuner" on each of the four tuning machines so he can raise or lower the pitch of each string by a specific amount quickly. There is a second tuning-lever system at the bridge for lowering the pitch of multiple strings at once.
The point is that he has composed pieces where he changes alternate tunings in the middle of the piece, without stopping.
Here he is explaining his system.
Answer: I just treat the five-string like a 6-string missing the high E. It's a lot easier than trying to figure out what notes to play on the B and makes for some super heavy sounding drop-D notes.
Tune it in EADGB and either play standard or drop the D. Unlike the person who took the actual heavier string and put it in the 5th string position, just tune it like a regular bass with one extra higher string.
Answer: One time, for fun, I strung one of my 5-strings EADGB.  I just put the low B at the bottom of the strings instead of in it's usual position at the top.  It was fun to mess with but not really practical.  The reason I tried this was because I normally play 4-strings and wanted to have the feel of a 4-string with the option of playing a low B infrequently.  Having the low B at the bottom kept it 'out of the way' in a sense.
Answer: The dude Fuzz from Disturbed (Original bass player) actually tuned his bass like this on some songs:
Bb - Db - Ab - Db - Gb
This way his 4 higher strings would be in tune with the guitar player, while keeping his low B  tuned down 1/2 step like the A - D - G strings.

Options for tuning 5-string bass?


Can I delete the content of "~/Library/Mail Downloads"?

Question: Since I have to use Outlook from now on (policy of my employer), I have deleted all my accounts in Mac Mail. Nevertheless, there are a lot of files in the folder "~/Library/Mail Downloads". Why aren't they deleted as well? Can I delete them manually?
Answer: This directory is used to temporarily store attachments you open from Mail.app. They should be deleted automatically when you close the attachment. However, if you open an attachment, edit it and save it, then (in my experience at least) the attachment will tend to remain in that folder. Not all apps cause this (e.g. some Apple apps ask you to duplicate the attachment), but some do (MS Office seems to be a culprit for me). You can certainly delete these files manually now, although you might want to check you haven't accidentally saved something important there.
Comment: After moving all files from "Mail Downloads" to thrashcan restart the mail app.
Answer: Yes you can delete them. Attachments that you download are stored in Mail Downloads. If you don't value your stored attachments, you can delete the contents of Mail Downloads.


Is the Collatz conjecture in $\Sigma_1 / \Pi_1$?

Question: Prompted by some of the comments on this question, I'm wondering if anything is known about the place of the Collatz Conjecture in the arithmetic hierarchy.  More specifically, is Collatz known to be equivalent to a $\Sigma_1$ or $\Pi_1$ statement?  It's obvious that it can be expressed in the second level of the hierarchy, as $\forall n\exists k . C^{(k)}(n) = 1$ (and I believe functional composition is $\Delta_0$, so the fact that we're using a slightly extended language here should be moot; we can encode the computational path involved in computing $C^{(k)}(n)$ as a finite sequence of integers and thus as a single integer by appropriate coding), but there doesn't seem to be any obvious way of expressing it as a first-level statement...
Comment: @mjqxxx: if we try to check (B) according to your last recipe, and if we are by accident on a divergent trajectory - isn't the result whether we are on an orbit or on a divergent trajectory not depending on the *answer* whether the current trajectory is in fact divergent?
Comment: The Collatz Conjecture can be written as a conjunction: (A) every Collatz sequence is bounded, and (B) the only Collatz orbit is $(1,4,2)$.  Neither part is known to be true or false.  But it seems like (B) is in $\Pi_1$, since it can be written as $\forall{n,k}.(C^{(k)}(n)=n)\rightarrow(n=1\vee n=2\vee n=4)$.
Comment: @mjqxxxx: That looks right to me - (A) is definitely the tricky part, though, and it doesn't look to have an easy $\Pi_1$ formulation.  I saw a slightly-sketchy looking paper on the web that seemed to say that questions about similar sequences were $\Pi^0_2$-complete and I seem to recall results along those lines about 'multi-Collatz' sequences with more than one iterable function (maybe from John Conway?), so I suspect there may not be any known answer for this.
Comment: The usual statement is $\Pi_2$, but since the Collatz conjecture is a sentence it is equivalent to either $0=1$ or $0=0$... (Assuming we're working in the standard model. If you're asking whether the conjecture is provably equivalent to a $\Pi_1$ or $\Sigma_1$ sentence over PA or ZFC, that's a different matter.)
Comment: @StevenStadnicki I don't know if this will help but I find this the simplest form of the conjecture to work with. You can write the conjecture $f(x)=3x+2^{v_2(x)}$ and the conjecture is $\forall x\in\mathbb{N_{>0}}\exists n:f^n(x)\in\langle2\rangle$ where $\langle2\rangle=\{1,2,4,8,16,32,\ldots\}$
Answer: As suggested in my comment above, I will interpret your question as asking whether the Collatz conjecture is provably equivalent to a $\Pi_1$ or $\Sigma_1$ sentence over some base theory $T$. There are a variety of issues at stake depending on the outcome of the conjecture (in the standard model).
Case 0: The Collatz conjecture is false because some Collatz sequence is periodic with a period other than $4,2,1$. In that case, the Collatz conjecture is provably equivalent to $0=1$ over any theory with enough power to encode and decode the witnessing sequence up to its first repetition (e.g. PA or I$\Sigma_1$).
Case 1: The Collatz conjecture is false because some Collatz sequence never repeats itself. In that case, the conjecture is perhaps equivalent to a $\Pi_1$ sentence. To say that the Collatz sequence starting with some standard number $n_0$ is never repeating is a $\Pi_1$ statement. In the strange scenario where the Collatz sequences that don't repeat are precisely the ones that go through $n_0$, then the Collatz conjecture is equivalent to that $\Pi_1$ statement. More generally, if there is a (standard) finite list $n_0,n_1,\dots,n_k$ such that the Collatz sequences that don't repeat are precisely those that go through one of these, then we also have a $\Pi_1$ sentence equivalent to the Collatz conjecture. Still more generally, if there is a computable sequence $n_0,n_1,\dots$ with that property, we also have a $\Pi_1$ sentence equivalent to the Collatz conjecture. However, if no such computable sequence exists then it is unlikely that we can do better than $\Sigma_2$ unless we use a non-axiomatizable base theory like the $\Pi_1$ theory of the standard model.
Case 2: The Collatz conjecture is true. In that case, the Collatz conjecture is equivalent to the statement that $g(n) = (\mu k)(C^k(n)=1)$ is a total computable function. We can then compare $g$ to various levels of the fast-growing hierarchy for a more precise analysis. For example, if $g(n)$ is bounded above by some $f_k$ where $k$ is finite, then $g$ is actually primitive recursive and the Collatz conjecture is provably true in I$\Sigma_1$ (same as PA except that induction is restricted to $\Sigma_1$ formulas). If $g(n)$ is abounded above by some $f_\alpha$ with $\alpha \lt \varepsilon_0$, then the Collatz conjecture is provably true in PA. If $g$ grows faster than that then a still stronger theory is required to prove the Collatz conjecture.
Comment: For every Collatz sequence going through $n_0$ that doesn't terminate, there are in fact infinitely many non-terminating sequences which don't go through $n_0$ so it looks like $\sum_2$ is the case if it's false (which it is almost certainly not). I can easily prove this by showing you that $\{4^m\cdot n_0+\tfrac{4^m-1}{3}:m\in\Bbb N\}$ all go to the same successor as $n_0$ - and they could never pass through $n_0$ as to do so would contradict the assumption that $n_0\ldots$ does not terminate (is not a loop).
Answer: I've never dealt much with the question of divergent trajectories (condition (A) in mjqxxx's comment), but the question of existence of orbits (condition (B))  can be translated into a question, whether finite sets $\small E_N $ of N integer parameters $\small \left<A,B,C,\ldots,H \right> $ where $\small A,B,\ldots,H>0 $ admit a rational solution of a related system of linear equations.
(Note: that parameters are used as exponents in the "Syracuse"-formulation of the Collatz-problem: $\small x_{k+1}=(3x_k +1)/2^A $ where $\small x_k $ is odd and A is such, that also $\small x_{k+1} $ is odd).
If we denote the number of the above parameters as N and their sum as S then N and S must be in a (not exact, but tight) relation, for instance $\small 1.5 N < S< 2N $ so the values of the parameters for any set $\small E_N $ are upper-bounded.
Moreover, the number of parameters, which equal 1 versus that which exceed 1 is related by the fact, that the 1 -parameters represent rising and >1-parameters represent falling steps in the "Syracuse"-notation
Then the question of the existence of nontrivial cycles of any specified length N can be solved by enumeration and the check of solutions:  "has the solution integer value?" of the associated linear equation which has the form $\small x={Q(A,B,C,...,H) \over 2^S-3^N}$ where $\small Q(\ldots) $ is a linear composition of powers of 3 and 2 with exponents made from the parameters A,B,...,H. The amount of computation for each N is then limited by the number of combinatorical choices to satisfy the mentioned limitations for the set of N parameters . This is a kind of problem which can be solved by a supertask-machine because it is subfactorial for each N .
(I've done a related discussion about the existence of cycles in that "Syracuse"-view of the problem and the relation to the linear equation myself, but a more professional discussion of this point of view and the description of the equation (and for some specific types of cycles of a complete system of linear equations) is done for instance by John Simons 2007, one example online here or even better here in an updated joint article with Benne de Weger 2010, which I just found here)


what's better for SEO : a 301 moved page vs an alias?

Question: I recently optimized my site changing the keywords but also the path to those pages (I'm using human readable urls)
So google will not find those pages anymore...
what's the best aproach in this case:
making an alias keeping the old urls as well showing the new content or redirecting with 301?
Comment: If you use 301 Google, and the likes, should be able to pick up the change.

We won't google find the human readable URLs?
Comment: the human readable wasn't intended for searches, it just created the following case : the old url was:mysite.com/keyword1-keyword2.html changed into mysite.com/keyword3-keyword4.html, so I've made an alias so when you enter to mysite.com/keyword1-keyword2.html you actually see mysite.com/keyword3-keyword4.html. But if you say that a 301 would be better then.. I will do that then.. (I think duplicate content is not good right? )
Answer: Redirect requests for the old page to the new one with a 301 header. There's no point in having the same content on different URLs unless you have to.
If you do end up with the same content available from multiple URLs, use the canonical link element to tell Google which single URL you want it to favour.
Answer: Do the 301 redirect. It not only tells both your users and search engines that the page has moved, but the search engines will transfer and link love it found for the old pages to the new which will help your SEO.
If you use aliases so there can be more then one URL to find the same content which may possibly confuse users who will see the same content on different URLs. Canonical URLs will help the search engines avoid that issue but it won't do anything for humans.


How to fix "error: unknown file system" on all available partitions

Question: I've had a running problem with removing Linux from my Windows 7 laptop. Initially, it was installed as a dual-boot, and worked well. To remove, I deleted the partitions on my laptop. This removed grub, and I was left with needing to enter:
set root=...
set prefix=...
insmod normal
normal

each restart. I didn't restore the Windows boot-loader and have since re-partitioned my drive.
Now, upon reaching the command prompt screen, an ls query showshd0, with three partitions, but none of them have a recognizable boot-loader as each returns with error: unknown file system.
Booting from a Windows 7 rescue disk doesn't seem to work, as it sends me to the same command prompt terminal.
All I'm looking to do is restore the boot-loader, either grub or Windows 7. Any help would be appreciated.
Thanks in advance.
Answer: boot Windows 7 rescue disk. When command prompt appear type:
BootRec.exe /fixmbr

or
BootRec.exe /fixboot