## Iterative-substitution method yields different solution for T(n)=3T(n/8)+n than expected by using master theorem

I’s like to guess the running time of recurrence $$T(n)=3T(n/8)+n$$ using iterative-substitution method. Using master theorem, I can verify the running time is $$O(n).$$ Using subtitution method however, I arrive at a different answer than expected..

$$T(n)=3T(n/8)+n\ =3T(3T(n/8^2)+n)+n=3^2T(n/8^2)+3n+n\ =3^2(3T(n/8^3)+n)+3n+n=3^3T(n/8^3)+3^2n+3n+n$$

We can see the pattern: $$3^iT(n/8^i)+n*\frac{3^i -1}{2}$$

The recursion finishes when $$i=log_8 n$$.

Substituting i into the discovered pattern, $$3^{log_8 n}T(1)+n*\frac{3^{log_8 n} -1}{2} =\ n^{log_8 3}*c+0.5n*n^{log_8 3} – 0.5n =n^{log_8 3}*c+ 0.5n^{log_8 3+1}-0.5n \in O(n^{1.52})$$.

What am I doing wrong? why is my answer not $$O(n)$$ ?

## Can a Drunken Master Monk spend a ki point to use flurry of blows, but use the disengage part to move to a different target before attacking with it?

Can a Drunken Master Monk spend a ki point to use flurry of blows, but use the disengage part from the Drunken Technique feature to move to a different target before attacking with the flurry of blows?

## How does Polearm Master interact with Quarterstaff and Whip?

While you are wielding a glaive, halberd, pike, or quarterstaff, other creatures provoke an opportunity attack from you when they enter your reach.

Let’s say my character is wielding a quarterstaff in one hand and a whip in the other hand, and I have the Polearm Master feat. When a character enters a square within 10 feet of me (which is within my reach with the whip), can I use the whip to make an opportunity attack?

## How to use master theorem to solve $T(n)=4T(n/8) + \sqrt n (log_2 n)^2$

I want to solve the following using master theorem.

$$T(n)=4T(n/8) + \sqrt n (log_2 n)^2$$

I have: $$a=4, b=8,f(n)=\sqrt n (log_2 n)^2$$

I calculate $$n^{log_b a} = n^{log_8 4} = n^{2/3}$$

I compare $$f(n)=\sqrt n (log_2 n)^2$$ with $$n^{2/3}$$, and see that $$f(n)$$ grows faster than $$n^{2/3}$$.

So using master theorem, rule 3, $$f(n) \in \Omega (n^{2/3 +some \ c})$$, which means $$T(n) \in \Theta(f(n))$$

$$———————————-$$

But I guess this isn’t correct, according to this master theorem calculator tool I used to check my answer https://www.nayuki.io/page/master-theorem-solver-javascript

Where’s the mistake?

## Would this Owlbear Cub be balanced as a Beast Master Ranger’s Companion?

The players in my campaign just hit third level and the Ranger is planning on taking the Beast Master path. She wanted a baby Owlbear as her companion, but of course there are 2 hurdles. There aren’t official stats, and technically it’s a Monstrosity, not a Beast. I’m okay w/ ignoring the second problem since it’s a home game, and these stats I compared the Wolf, Boar and Panther and am hoping this is a reasonable approximation.

My understanding is that the Beast Master path is generally considered to be under powered, and I also wanted to emphasize some of the aspect of Owlbears (aggression and ferocity for example) to that end there are the two Reactions/Statuses the cub can be in. While Training it’ll follow commands as normal and I suspect this might be a little strong at L3-4, but kind of to counter balance it, when it gets injured (Temper) it will temporarily forget training (with the Ranger having a chance to keep it under control) and it will stop behaving like a companion to murder whatever hurt it. I think this will still be generally helpful (it is trying to murder an enemy) but could be problematic if the enemy flees or tries to surrender.

So yeah, does this seem balanced? Is it too strong? Is there some issue w/ Temper I haven’t thought of that will make it a problem?

Prettier formatting on Homebrewery

NOTE: I have included the proficiency bonus of 2 added to: AC, Attack & Damage rolls. It’s not proficient in any skills or saves Maybe it should be?

## Owlbear Cublet

Tiny monstrosity, unaligned

• Armor Class 15
• Hit Points 22 (2d10 + 2)
• Speed 25 ft.

STR 12 (+1) | DEX 16 (+3) | CON 13 (+1) | INT 3 (-4) | WIS 12 (+1) | CHA 4 (-3)

• Senses darkvision 60 ft., passive Perception 11
• Languages
• Challenge 1/4 (50 XP)

Keen Sight and Smell: The cub has advantage on Wisdom (Perception) checks that rely on sight or smell.

### Actions

Beak: Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 1d6 + 5 piercing damage.

Claws: Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 1d4 + 5 slashing damage.

### Reactions

Training: When the cub sees its master make an attack, the cub makes one beak attack against the same target.

Temper: When reduced to 1/2 HP the cub is likely to forget it’s training. It’s master may make DC 13 Animal Handling check as a reaction to maintain control; otherwise it forgets Training and relentlessly attacks the last creature to injure it until one of them is dead. While in Temper it acts before it’s master’s turn and multi-attacks with both it’s Claws and Beak. It suffers a -2 Rage penalty to hit.

## After change to 13306, Galera logs error: Slave I/O: error connecting to master ‘repuser@:3306’

Working with Galera 25.3.23 on RHEL 7.3

Galera works good before. After changing the MySQL server port from 3306 to 13306, one of the node report error, after restart:

Slave I/O: error connecting to master 'repuser@<IP>:3306' - retry-time: 60  maximum-retries: 86400  message: Can't connect to MySQL server on '<IP>' (111 "Connection refused"), Internal MariaDB error code: 2003 

The other 2 nodes works fine after the restart.

Googled the web, but don’t find the way to specify the port number.

Also, if possible, please share the usage of the “repuser” ID.

## Android Encryption: Can an attacker get the master key due to Android’s default password and wear-leveling?

Since Android 5.0: Upon first boot, the device creates a randomly generated 128-bit master key and then hashes it with a default password and stored salt. The salt and the encrypted master key are stored in the crypto footer.

When the user sets the PIN/pass or password on the device, only the 128-bit master key is re-encrypted and the crypto footer is updated.

Because of wear-leveling multiple “versions” of a single sector may be available to an attacker. For my understanding Android can not ensure that the old encrypted master key is really overwritten.

Would it therefor theoretically be possible for an attacker to decrypt the user data by recovering the old encrypted master key (derived from the default password) and thus calculating the static unencrypted master key with the known salt and the default password.

## Master – Master setup on Postgresql 10 + Ubuntu 18.04 + Pgpool II

Does anybody have experience in configuring Pgpool II with Postgresql 10 on Ubuntu 18.04?

I am trying to setup Master – Master setup on Postgresql 10 + Ubuntu. I am trying to use Pgpool II

I will have two or more mater DB servers running on different IPs and my objective is synced with each other.

I am looking for an open-source solution/s Your thoughts, suggestion and experiences are kindly welcome. Cheers

## Solve $T(n) = 16T(n/2)+[n\log_2 {n}]^4$ using Master Theorem

The problem is to solve this using Master Theorem :

$$T(n) = 16T(n/2)+[n\log_2 {n}]^4$$

My attempt: I said that master theorem does not apply because the ratio of $$f/g = [\log_2 {n}]^4$$. This has no polynomial factor. But, when I looked at similar problems online, I saw some people apply case #2 here.

The version of the Master Theorem we use is as follows:

Our book also notes that in the first case not only must $$f$$ be smaller than $$n^{\log_b{a}}$$, it must polynomially smaller, that is, $$f$$ must be asymptotically smaller than $$n^{\log_b{a}}$$ by a factor of $$n^\varepsilon$$ for some constant $$\varepsilon>0$$. Similarly, in the third case, not only must $$f$$ be larger than $$n^{\log_b{a}}$$, it must polynomially larger.

## Solve the following recurrences using Master Theorem

Solve the following:

1. $$T(n) = 2T(n/2)+\log_2 {n}$$

2. $$T(n) = 16T(n/2)+[n\log_2 {n}]^4$$

3. $$T(n) = 7T(n/3)+n$$

For number 1 I am stuck because I want to say the master theorem doesn’t apply since $$\log_2{n}$$ cannot be written as a polynomial, but the ratio of $$f/g$$ is $$n/\log_2{n}$$, which has an $$n$$ term in it. And $$f$$ clearly is less than $$g$$. So, does case 1 apply or not? I have found very mixed results online.

For number 2 I said that master theorem does not apply because the ratio of $$f/g = [\log_2 {n}]^4$$. But, when I looked at similar problems online, I saw some people apply case #2 here.

For number 3, I said it was case # 1 of the Master Theorem, so the answer is $$T(n)=\Theta(n^{\log_3 {7}} )$$ .