Show that recurrence is O(phi^logn)

I have a function whose time complexity is given by the following recurrence:

\begin{equation*} T(n) = \begin{cases} \mathcal{O}(1) & \text{for } n=0\ T(k)+T(k-1)+\mathcal{O}(1) & \text{for } n=2k\ T(k)+\mathcal{O}(1) & \text{for } n=2k+1\ \end{cases} \end{equation*}

and I have to prove that $ T(n)\in \mathcal{O}(\phi^{log_2 n})$

Where $ \phi$ is the golden ratio, $ (1 + \sqrt5)\over2$

I think I could prove it by induction but, how would I go on about it if I didn’t know that $ T(n)\in \mathcal{O}(\phi^{log_2 n})$ in the first place?

Thanks!

how to write a function to show lists of running processes or while loop functions in php

Please i have a while loop function that am using to insert data into my database periodically, for some reasons i found out that while loop is more easy to use than cronjob, while loop runs without anyone having to visit the site, but my problem is that once a while loop is started it keeps running even if you delete the codes from your php file, it keeps running, and if you amend the code with new values and start it again both the old loop and the new one keeps running. My question is how can i write a php function that will list out all current running loop processes in my webhost or server and then use another code to end or stop or remove it from running?

Below is my code

$  date = date('Y-h-m H:i:s'); $  counter = 0; while($  counter < 10){      $  wpdb->query("INSERT INTO a_boy (username, password) VALUES ('cash', $  date)");     $  counter + 1;     sleep(60); } 

Show that exist a finite set of clauses F in first-order logic that Res*(F) is infinite

I’m kind of desperate at this point about this question.

A predicate-logic resolution derivation of a clause $ C$ from a set of clauses $ F$ is a sequence of clauses $ C_1,\dots,C_m$ , with $ C_m = C$ such that each $ C_i$ is either a clause of $ F$ (possibly with the variables renamed) or follows by a resolution step from two preceding clauses $ C_j ,C_k$ , with $ j, k < i$ . We write $ \operatorname{Res}^*(F)$ for the set of clauses $ C$ such that there is a derivation of $ C$ from $ F$ .

The question is to give an example of a finite set of clauses $ F$ in first-order logic such that $ \operatorname{Res}^*(F)$ is infinite.

Any help would be appreciated!

Show that the best case time complexity of Quicksort is $\Omega(n \log n)$

I am trying to show that the best case time complexity of Quicksort is $ \Omega(n \log n)$ .

The following recurrence describes the best-case time complexity of Quicksort:

$ $ T(n) = \min_{0 \le q \le n-1} \left(T(q) + T(n-q-1) \right) + \Theta(n).$ $

But I have difficulty in proving that $ T(n) = \Omega(n \log n)$ using the recurrence above.

So how to solve this recurrence?

Given a tournament with $2^n$ vertices, show that there is a sub-tournament with at least $n + 1$ vertices that is acyclic

So a tournament is just a complete directed graph, I believe.

I’m having trouble proving this problem. I know it is induction however. I was thinking the base case is $ 2^1$ vertices, and therefore we have a sub-tournament of 1 + 1 vertices, which holds.

Then in our induction step we have to show $ 2^{n + 1}$ . But I’m not sure how to approach this. Any ideas would be extremely appreciated.

Woocommerce Show categories under product title in products list

I want to know how can I have the products listed showing with the following information:

  • Image
  • Price
  • Category
  • Product Title

Here is an example:

enter image description here

I was trying to use a hook like this in functions.php without success:

add_action( 'woocommerce_shop_loop_item_category', 'woocommerce_template_loop_product_category', 10 ); 

How can I show the effects of illusions in Roll20?

My players are approaching a battle with Fraz-Urb’luu, who will have prepared the battlefield in some manner using an effect like Mirage Arcane and several other illusions and deceptions.

Given that I anticipate some characters having the benefit of True Seeing and others will not, is there a way for me to somehow present both the illusory and real battlefield? Ideally the method is practical to implement, but if I need to learn some technical skills to make this happen, that’s fine as well.

I typically will create my own maps using a combination of the blank background and whatever tokens I can find for free online. For example, my most recent map had the players fighting on Avernus, so I started with a red background, overlaid tokens on the Map layer to create mountains, sketched in linework and hatching for Styx and the portion of the Basalt Citadel that they could interact with.

The overall map was something like 60×75 squares. As we’re playing the game at very high levels, I’m intent on making large scale maps to allow players that have abilities that improve their mobility to enjoy that.

Show username only if logged in in a else no directly name

Hi I’m looking all over but I don’t find the solution: I have an infobox with: Hi, welcome to our “some text”

Now I’d like to add posibility for logged in users “Hello Tony, welcome to our “some text”

I tried following code snippet:

<div id="infoBox"> <button class="cross" type="button">X</button>   <p> Hello </p> <?php global $  current_user; wp_get_current_user(); ?> <?php if ( is_user_logged_in() ) {   echo 'Username: ' . $  current_user->user_login . "\n"; echo 'User display name: ' . $  current_user->display_name . "\n"; }  else { wp_loginout(); } ?>      <p>  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub    </p> </div> 

but there’s a fatal error in my XAMPP testing environment:

Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /opt/lampp/htdocs/wordpress/wp-content/plugins/stoerer/stoerer.php:31 Stack trace: #0 /opt/lampp/htdocs/wordpress/wp-settings.php(377): include_once() #1 /opt/lampp/htdocs/wp-config.php(90): require_once(‘/opt/lampp/htdo…’) #2 /opt/lampp/htdocs/wordpress/wp-load.php(42): require_once(‘/opt/lampp/htdo…’) #3 /opt/lampp/htdocs/wordpress/wp-blog-header.php(13): require_once(‘/opt/lampp/htdo…’) #4 /opt/lampp/htdocs/wordpress/index.php(17): require(‘/opt/lampp/htdo…’) #5 {main} thrown in /opt/lampp/htdocs/wordpress/wp-content/plugins/stoerer/stoerer.php on line 31 There has been a critical error on your website.

Show that the language L = { | M1 is a Turing machine that accepts 0} is Turing recognizable

Show that the language L = {< M1 > | M1 is a Turing machine that accepts 0} is Turing recognizable. I was told by my professor to go about this proof by giving an informal description of a Turing Machine ‘V’ that would accept ‘M1’ if and only if ‘M1’ was a Turing Machine that accepts 0.

Below I have the informal description I gave for the Turing Machine ‘V’. I wanted to know if my description accurately depicts the Turing Machine ‘V’ and therefore proves that the language ‘L’ is Turing recognizable. Any feedback would be appreciated.

“V On input M1 where M1 is a Turing Machine

i = 1, stop = false;

While (stop==false){

Simulate i steps of M1 on 0

If the simulation enters an accepting state, stop = true. else i=i+1

}

accept.”