I am trying to solve the following recurrence relation using the master theorem:  $ T(n) = 4T(n/2) + n^2 \log n$  So: $a=4 ,b=2, f(n)=n^2\log n$ , then $n^{\log_2 4}=n^2 $  Now i know that $n^2 \log n $ is larger .  Can I apply the master theorem to this problem?  Thanks.
Find the asymptotic tight bound in  $$ T(n) = 4T\left(\frac{n}{2}\right) + n^{2}\log n. $$  where $ \log n= \log _{2}n $ and $T(1) = 1$.  I should solve this using all three common methods: iteration, master theorem and substitution.  It is highly likely that this kind of recurrence equation will be in my test in two days. Thank you very much in advance!
How can I automate the workflow for producing multiple versions of a document? Say you have two versions of the same LaTeX document.    For instance, you have one version of your lecture slides for actually delivering a lecture: as you're really not a big fan of the "wall of text", this version would be parsimonious in terms of text content, allowing the audience to listen to what you're talking  about instead of reading the slides, and giving graphical content centre stage.  Another version of those slides, made available to the audience after the lecture, for self-study, would be more self-contained and include a summary of what you said during that lecture along with the graphical content mentioned above.  Consider that you can toggle between the two versions by either changing a class option or by changing the value of some dedicated counter in your input file; something relatively simple to do "by hand".  To produce two different versions of the same document, my current workflow is   "manually" compile the first version, change the filename of the output produced (in order to prevent overwriting in step 4) make appropriate changes in my input file to switch to the second version, "manually" compile the second version.   However, this workflow is tedious and error-prone, especially when the number of different versions increases. I would like to automate it as much as possible. Is there a way to batch compile all the versions of my document, each getting a different output filename?  I guess that would involve modifying the input file at the command line (I'm on Mac OS X), but I don't know how to do that.  Do you have an automated workflow for compiling multiple versions of the same document? How do you do it?  Edit: I figured it out using  and  on , of which my question is a duplicate. Get current editor toolbar tab via Python? Why isn’t singular ‘they’ used with 3Sg verb forms? There are many (duplicate) questions about the acceptance, popularity and history of singular they (and their, them and themself) around here, it even got a tag of its own. If I didn’t miss anything, however, the proper verb form hasn’t been questioned yet.  As we all know, English third person singular pronouns (it, she, he and one, +body), names (Alice, Bob, …) and nouns (student, teacher, …) demand the +(e)s suffix be added to the finite verb form in simple present, where some auxiliary verbs have a “special” form (is &lt; *bes / *ares and has &lt; *haves). All other subjects don’t, including plural third person pronoun they.  When the plural you replaced thou (with thee, thy / thine), the other marked verb form that had remained in English – i.e. suffix +(e)st or +t – vanished, too. The first and second persons only ever appear as pronouns (I, we; you), not names or nouns, so there was no strong inclination to keep the verbal inflection.  The second person precedent would suggest that singular they be used with uninflected verb forms which is how it’s usually encountered in the wild. Assuming that they someday replaces he and she (and maybe it) it would lead to disagreement with the words the pronoun stands in for:        Alice         goes to her   place  by herself.   Bob           goes to his   place  by himself.   Alice and Bob go   to their place  by themselves. – (common)   Alice and Bob go   to their places by themselves. – (separate)                  She  goes to her   place  by herself.   He   goes to his   place  by himself.   They go   to their place  by themselves.   They go   to their places by themselves.                  They ?goes to their place  by themself.   ditto   They  go   to their place  by themselves.   They  go   to their places by themselves.                  They ?go to their place  by ?themselves.   ditto   They  go to their place  by  themselves.   They  go to their places by  themselves.      So why doesn’t singular they afford s on present-tense verbs like all other third person singular subjects do?   I learned about singular they only long after I had been taught English as a second language in school. That’s why it’s still a conscious decision to use it and hence I could easily adapt to use s forms with it, but would that sound and look funny / strange / wrong to native speakers? Apply display settings to all user accounts? Why can't I run two mysqli queries? The second one fails Why do we say that the Earth moves around the Sun? In history we are taught that the Catholic Church was wrong, because the Sun does not move around the Earth, instead the Earth moves around the Sun.  But then in physics we learn that movement is relative, and it depends on the reference point that we choose.  Wouldn't the Sun (and the whole universe) move around the Earth if I place my reference point on Earth?  Was movement considered absolute in physics back then? How To Program A Bash Script That Presses A Certain Combination Of Keys? Please, i need someone to help me in making a very simple bash script. The job of this script is just to press a certain combination of keys on the keyboard.  My objective is to create a script that would turn off the Kubuntu desktop effects completely. The key combination for that is: "Left-ALT + Left-Shift + F12". I am aware that there is a widget that might do this job, but i am trying to learn how to accomplish it with a bash script.  I have tried to do an online search but i guess i was choosing the wrong set of keywords. I did not manage to reach a tutorial or a reference that would mention this task.  Thanks in advance for your help!  P.S: Any suggestions, references, notes, comments or tutorials would also be greatly be appreciated. How to calculate the summation $(\sum_{p = k}^{n} \binom{n}{p}) / 2^n$ quickly? I was solving a question which technically reduces to the following     Given $N$ items, it is equiprobable for each item to be good or bad, what is the probability that number of good items in the set are greater than or equal to $K$.   This can be reduced to $\dfrac{x}{2^n}$ where $\displaystyle x = \sum_{p = k}^{n} \binom{n}{p}$. Is there a more simplified form which is easier to calculate for large values of $N, K$?  Note: It may be safe to assume that we do not require extremely high precision while calculating(first 5-10 digits only).  Thanks! What is $48\div2(9+3)$? Formatting a float to ###.## (two decimals) Notation for functions vs. numbers Is there a Pythonic way to have only one instance of a program running?   The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?    (Take into consideration that program is expected to fail sometimes, i.e. segfault - so things like "lock file" won't work) Evaluate the integral   $$\int\frac{1}{x^2\left(x^4+1\right)^{3/4}}\,dx$$   My Attempt:  Let $x = \frac{1}{t}$. Then $dx = -\frac{1}{t^2}\,dt$. Then the integral converts to   $$ -\int \frac{t^3}{(1+t^4)^{3/4}}\,dt $$  Now Let $(1+t^4) = u$. Then $t^3\,dt = \frac{1}{4}du$. This changes the integral to  $$ \begin{align} -\frac{1}{4}\int t^{-3/4}\,dt &amp;= -u^{1/4}+\mathcal{C}\\ &amp;= -\left(1+t^4\right)^{1/4}+\mathcal{C} \end{align} $$  So we arrive at the solution  $$\int\frac{1}{x^2\left(x^4+1\right)^{3/4}}\,dx = - \left(\frac{1+x^4}{x^4}\right)^{1/4}+\mathcal{C.}$$  Question: Is there any other method for solving this problem? I think I've got it down to the most basic case:  int main(int argc, char ** argv) {   int * arr;    foo(arr);   printf("car[3]=%d\n",arr[3]);   free (arr);   return 1; }  void foo(int * arr) {   arr = (int*) malloc( sizeof(int)*25 );   arr[3] = 69; }   The output is this:  &gt; ./a.out   car[3]=-1869558540  a.out(4100) malloc: *** error for object 0x8fe01037: Non-aligned pointer                          being freed  *** set a breakpoint in malloc_error_break to debug &gt;   If anyone can shed light on where my understanding is failing, it'd be greatly appreciated. I have an input type="image". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image is paired with, I setup an event handler for the input-image. Then when the user clicks the image, they get a little popup to add some notes to the data.  My problem is that when a user enters a zero into the text box, I need to disable the input-image's event handler. I have tried the following, but to no avail.  $('#myimage').click(function { return false; }); How to connect to my web server? How to convert .bib generated by Mendeley for use with amsrefs I'm using TeX live 2010.  I have a .bib file generated from Mendeley, and  I want to use that with amsrefs, but it's confusing and the amsrefs documentation is somewhat hard to follow: how do I massage the .bib file into something that amsrefs can stomach. (I'm using amsart as the document class). Daily forecasting We have three years of data for online visits at a daily level. We want to forecast the daily visits for the next 90 days. What would be the best method to capture weekday seasonality , holiday seasons, and also the drift.  Can this be successfully done in R? We are currently using R. We have considered ARIMA but it does not capture seasonality.  While converting the data to a time series in R,  what should be the "frequency"?  Should we use ARIMA with regressors? Can X.org Load Two Different Drivers? (Triple-Head Setup with Intel and NVidia Card) We want to set up a 3 screens with an onboard intel graphics adapter and an nvidia card.  Both cards are recognized in lspci   01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2) 00:02.0 Display controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)   And bascially work: If I switch to the console, I see output on the Intel card, X is only running on the Nvidia card.  But when I type xrandr | grep conn I get only one connected port:   DVI-I-0 disconnected (normal left inverted right x axis y axis) VGA-0 disconnected (normal left inverted right x axis y axis) DVI-I-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm HDMI-0 disconnected (normal left inverted right x axis y axis)   I am on Ubuntu 12.10 (and XFCE) and installed the proprietary nvidia driver.  I was assuming that X maybe has a problem to autodetect both cards, so I thought the following xorg.conf could help:   Section "ServerLayout"     Identifier     "Layout0"     Screen      0  "Screen0"     Screen      1  "Screen1"     InputDevice    "Keyboard0" "CoreKeyboard"     InputDevice    "Mouse0" "CorePointer" EndSection  Section "Files" EndSection  Section "InputDevice"     # generated from default     Identifier     "Mouse0"     Driver         "mouse"     Option         "Protocol" "auto"     Option         "Device" "/dev/psaux"     Option         "Emulate3Buttons" "no"     Option         "ZAxisMapping" "4 5" EndSection  Section "InputDevice"     # generated from default     Identifier     "Keyboard0"     Driver         "kbd" EndSection  Section "Monitor"     Identifier     "Monitor0"     VendorName     "Unknown"     ModelName      "Unknown"     HorizSync       28.0 - 33.0     VertRefresh     43.0 - 72.0     Option         "DPMS" EndSection  Section "Device"     Identifier     "Device0"     Driver         "nvidia"     VendorName     "NVIDIA Corporation"     BoardName      "GeForce 210" EndSection  Section "Screen"     Identifier     "Screen0"     Device         "Device0"     Monitor        "Monitor0"     DefaultDepth    24     SubSection     "Display"         Depth       24     EndSubSection EndSection   Section "Monitor"     Identifier     "Monitor1"     VendorName     "Unknown"     ModelName      "Unknown"     HorizSync       28.0 - 33.0     VertRefresh     43.0 - 72.0     Option         "DPMS" EndSection  Section "Device"     Identifier     "Device1"     Driver         "intel"     VendorName     "Intel"     BoardName      "Internal Intel Graphics" EndSection  Section "Screen"     Identifier     "Screen1"     Device         "Device1"     Monitor        "Monitor1"     DefaultDepth    24     SubSection     "Display"         Depth       24     EndSubSection EndSection   But it is still not working.   Is this generally possible to use two different drivers in X ? Is it necessary to create an xorg.conf manually then? (because Ubuntu 12.10 normally works without the xorg.conf) Are there any errors in my xorg.conf? I several days ago somewhere read that category and tag pages should be noindexed. But later on somewhere else, I read that, they only increase rank for search term, but overall traffic decreases- said one from his experience.  So, if I just concern about traffic, not about individual search term that much, should I make those category and tag pages as indexed to google? I am confused which is the best to do.  Thanks in advance.  Regards Rana