How to compute the general term formula for the number of full binary tree heaps that can be formed with distinct elements?

The number of possible heaps that are full binary trees of height $ h$ and can be formed with ($ n = 2^h – 1$ ) distinct elements can be computed by recursion: $ $ a_h = {2^h – 2 \choose 2^{h – 1} – 1} a_{h – 1}^2 $ $ How to compute the general term formula with this recursion formula?

Error messages generated in a table calculation prevent “good” elements of that table being accessed

If I make a batch fitting routine, something like:

FitResultsData =      Table[              SpectrumData = Import[SpectrumList[[i]]];                SpectrumFit = NonlinearModelFit[SpectrumData, Model, {a, b, c}, x];                  aFitOut = a /. SpectrumFit["BestFitParameters"];                  bFitOut = b /. SpectrumFit["BestFitParameters"];                     cFitOut = c /. SpectrumFit["BestFitParameters"];               {i, aFitOut , bFitOut, cFitOut},              {i, 1, Length[SpectrumList]}             ] 

and a fit fails completely, e.g. I get a Power::infy: Infinite expression 1/0.^2 encountered. error or something, I find that when it comes to going on to use FitResultsData after all Table[..] has finished fitting and executing no matter which row I select for example FitResultsData[[1]] the error Power::infy: Infinite expression 1/0.^2 encountered. will be returned. This happens even say the original source of the error was in spectrum i = 99.

Is there a method of escaping such errors, such that even though one spectrum fit might be bad, it doesn’t stop be accessing the 99% successful

What could be the bound of the number of elements of a models of a given first order sentence?

Sorry for the weird title.

The Problem:

Consider the first-order logic sentence

φ≡∃s∃t∃u∀v∀w∀x∀yψ(s,t,u,v,w,x,y) where ψ(s,t,u,v,w,x,y,) is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose φ has a model with a universe containing 7 elements.

Which one of the following statements is necessarily true?

  1. There exists at least one model of φ with universe of size less than or equal to 3
  2. There exists no model of φ with universe of size less than or equal to 3
  3. There exists no model of φ with universe size of greater than 7
  4. Every model of φ has a universe of size equal to 7

My attempt:
There exist at least one s,t, and u in some domain. It is also given that there exist a model with 7 elements. i.e there is at least one instance of v,w,x and y as well, together making 7 elements with s,t,u. So any other model of φ must have at least these 7 elements as well. Any model cannot have more than seven elements because there are only seven given. i.e every model of φ will have exactly seven elements. So Option 4 seems to be the right one.

I wish to develop intuition to solve these problems. Also I want to know your thought process and how you solve this problem. Thanks.

Top 5 important elements to consider in your digital branding plan

It is undeniably true that digital branding has been rapidly transformed by the modern-day changing dynamics and growing importance of digital target audience. Moreover, it is also true that businesses now have greater chances to maximize their sales through online mediums compared to the conventional mediums and practices. These and there are many other reasons that make your digital branding plan as the most important thing to plan and execute wisely.

– Don’t forget that you are dealing…

Top 5 important elements to consider in your digital branding plan

Find sub-matrix containing the maximum number of elements consisting only of 1’s

I am trying to get help on it here, originally posted first at:

Basically trying to get the max sub matrix that contains only 1’s of a matrix that is filled with 0’s and 1’s.

I could figure out the max sub matrix, now I just need to find how to do so that the sub matrix is only 1’s.

Find sub-matrix containing the maximum number of elements consisting only of 1’s

A matrix of integers of size R x C (R rows, C columns) is given. All its elements have a value of 0 or 1. The rows of the matrix are numbered from 1 to R, the columns are numbered from 1 to C.

I am trying to find the most effective algorithm that will output r1, r2, c1, c2 of a sub matrix that consists only 1’s and creates the maximum number of elements.

So far I thought of making a pre-matrix that counts the sum at each given element in the sub matrix (1, 1, r, c) and store it in a new matrix SUM (with same dimensions as the original matrix).

The formula for this could be then:

SUM[i, j] = SUM[i−1, j] + SUM[i, j−1] − SUM[i−1, i−1] + MATRIX[i, j]

I am not sure if I had to do the sums though, if anyone has experience with a similar problem I would appreciate an explanation.

How to apply command to all elements of a list?

So I generated a list of cities and I want to apply FindGeoLocation to all of them without having to seperate the elements and then applying.

y= CityData[{Large, Last[x]}]  

(x here is dynamically updated from

x = RandomChoice[CountryData[]]]  TextString@y 

Gives me a list of the Cities.

But now I want to take the list and have FindGeoLocation evaluate it at all the given cities in the list.

As far as I know, Map does that with functions. I don’t know what to do next.

How does the Way of the Four Elements monk’s Fangs of the Fire Snake elemental discipline work?

I’m confused by the wording of the Way of the Four Elements monk’s Fangs of the Fire Snake elemental discipline.

Specifically, how long does its bonus to the reach of unarmed strikes last, and how many times is the extra fire damage applied?

Here is an example scenario, with how I think it works:

  • A level 8 monk gets 2 attacks on his turn during the attack action, and a bonus action for Flurry of Blows, giving 2 additional unarmed strikes and a total of 4 unarmed strikes on his turn for 1 ki.

  • If he spends 1 ki for Fangs of the Fire Snake, the unarmed damage changes from bludgeoning to fire damage, and the reach is increased to a total of 15 ft.

  • When the monk’s turn ends, Fangs of the Fire Snake ends, so it is not possible to make an opportunity attack with this discipline.

  • If I hit with an attack I can expend another ki to add 1d10 of fire damage. This extra damage only applies to that singular hit, the next attacks don’t have the extra fire damage, and I can’t expend more ki to add another 1d10 on those attacks.

Is my interpretation of how the discipline works correct?