Where can I find a large diameter lens with a focal length equal to its physical length?

Some background: I read that for a Stanhope lens "the focal length of the lens equals the length of the lens" However, I am looking for a much larger diameter than a Stanhope, something like 15mm-25mm.

ac.com Mutative Algebra: ACC for prime ideal plus Krull dimension equal to 0 implies DCC for prime ideals

Suppose the ring is commutative and with 1.

We know that ACC + $ dim (R) = 0 $ involves DCC. However, if we only insist on the condition of the main ideals, can we conclude the same?

We know that having DCC in the main ideals is the same as being a perfect ring, but I'm not sure how to proceed from here.

(Note: ACC / DCC = ascending / descending chain condition).

nt.number theory – Products equal to consecutive integers

Summary: What are the non-trivial solutions to the question? Find two consecutive integer sequences whose products are equal. There are four known solutions, all of which consist of small integers, and there is no clear pattern connecting them. Given the small number of known solutions and the lack of a clear pattern between them, I suspect that this question contains more number theory than it first appears.

The "puzzle corner" of MIT News For March / April 2020, Sorab Vatcha poses a "speed" problem: "Find seven consecutive integers whose product equals the product of four consecutive integers." The obvious solution to "speed" is: 0, 1, 2, 3, 4, 5, and 6; and 0, 1, 2 and 3.

This leads to the general question of whether there are "nontrivial" solutions to find two different sequences of integers whose products are the same. Obvious trivial solutions involve (1) sequences containing 0, (2) replacing all integers in a sequence with their negatives, (3) adding or removing values ​​of 1 or -1, and (4) a sequence having length 1 (and therefore it contains an integer that is the product of the integers in the other sequence.) These criteria reduce the problem to finding two different sequences of integers $ ge 2 $ of length $ ge 2 $ whose products are the same.

There is a less obvious criterion of non-triviality: (5) The two sequences must not overlap. If the sequences overlap, then the overlapping part can be removed from both, producing a solution with shorter sequences. This interacts with prohibition (4) against length 1 sequences: removing the overlapping part can reduce a sequence to length 1, and the shorter solution can also be trivial. And, in fact, there is a large family of solutions built in this way: if the product of $ a cdots b $ it is $ P $, then $ a cdots (P-1) = (b + 1) cdots P $.

There are non-trivial solutions. The one with the smallest product is $ 5 cdot 6 cdot 7 = 14 cdot 15 = 210 $. Is there an enumeration of all solutions?

The known non-trivial solutions are:
$ 5 cdots 7 = 14 cdot 15 = 210 $,
$ 2 cdots 6 = 8 cdots 10 = 720 $,
$ 19 cdots 22 = 55 cdots 57 = 175,560 $Y
$ 8 cdots 14 = 63 cdots 66 = 17297280 $.

I have conducted several computer searches that have revealed no other solution: (a) all sequences with products less than $ 10 30, (b) sequences with numbers less than 10,000,000 and length less than 10, (c) sequences with numbers less than 1,000,000 and length less than 100, (d) sequences with numbers less than 100,000 and length less than 1,000, and (e) sequences with numbers less than 10,000 and length less than 10,000.

Also see https://math.stackexchange.com/questions/991728/equal-products-of-consecutive-integers/ and https://math.stackexchange.com/questions/3346618/non-trivial-solutions-to-equal -secutive-integer-products.

calculation – Why is $ int_0 ^ R 2 pi r , dr $ equal to $ int_0 ^ D pi d , dd $, assuming $ D = 2R $?

The argument I have seen for the area of ​​the circle begins with the definition of the circumference, $ C = 2 pi r $. So the argument is that the area of ​​the circle can be found by adding the circumferences of an infinite number of circles from the radius $ 0 $ to $ R $ (a constant radius) I mean,

$ int_0 ^ R 2 pi r , dr = pi R ^ 2 $

My thinking is why can't this argument also apply to diameter? Assuming that $ d = 2r $, where $ d $ is the diameter, and the definition of the circumference is $ C = pi d $, then the area of ​​the circle should be found by adding the circumferences of an infinite number of circles from the diameter $ 0 $ to $ D $ (something of constant diameter).

$ int_0 ^ D pi d , dd = frac { pi D ^ 2} {2} $

Assuming that $ D = 2R $Why are these two integrals not equal to each other?

stability in odes: show that all solutions to the Lorenz equations enter region H less than or equal to and never leave it

Thanks for contributing with a response to Mathematics Stack Exchange!

  • Please make sure answer the question. Please provide details and share your research!

But avoid

  • Ask for help, clarification or respond to other answers.
  • Make statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

For more information, check out our tips on how to write great answers.

python – Partition Equal Subset Followup (Memoization)

Hello, I've drafted a recursive solution for partition equal subset problem (https://leetcode.com/problems/partition-equal-subset-sum/) in LeetCode which is accepted:

class Solution(object):
    def canPartition(self, nums):
        """
        :type nums: List(int)
        :rtype: bool
        """
        if not nums or len(nums) < 2:
            return False
        if sum(nums) % 2 != 0:
            return False
        target = sum(nums) // 2
        # if the maximum number in nums goes larger than target, 
        # then this maximum number cannot be partitioned into any subarray
        # hence there's no solution in this case, return False early
        if max(nums) > target:   
            return False
        nums.sort(reverse = True)
        return self.helper(nums, 0, target, 0)

    def helper(self, nums, index, target, curr):
        # since "target" value is derived from dividing total sum, 
        # we only need to search for one sum that makes target value in the array
        # the rest is guaranteed to sum up to "target" 
        if curr == target:
            return True
        for i in range(index, len(nums)):
            if curr + nums(i) > target:
                continue
            if self.helper(nums, i + 1, target, curr + nums(i)):
                return True
        return False

However, as a follow-up, what would be the best way to really return the two subsets instead of just true / false. What would the code look like with saved subsets, if I had to update the previous existing code? I am one of those people who are starting with DP. Thanks in advance.

Why is the totalEntered value not always equal to the number of students who have entered the classroom?

Wondering why the TotalEntered value is not always equal to the number of students who have entered the classroom.

S1: wait(classroom);
S2: totalEntered = totalEntered + 1;
S3: work();
S4: signal(classroom);

java – Trying to write an equal method for a class containing an array of objects

I am trying to write a college class equality method that compares the contents of the matrices of the two college class objects. So the method will compare the Student () matrix on the university object with another Student () matrix on another university object and the same for the teacher () matrix. I have written an equal method for this, but it seems too long and not pretty. Is there a better way to write it?

University class

public class College
{
  private Student() student;
  private Teacher() teacher;
  public College()
  {
    student = new Student(9);
    teacher = new Teacher(9);
  }

  public Student() getStudent()
  {
    return student;
  }

  public void setStudent(Student() student)
  {
    this.student = student;
  }

  public Teacher() getTeacher()
  {
    return teacher;
  }

  public void setTeacher(Teacher() teacher)
  {
    this.teacher = teacher;
  }

  **public boolean equals(Object inObj)
  {// this equals method

    boolean isEqual = false;
    College inCollege = (College)inObj;

    if(student.length == inCollege.getStudent().length)
    { 
      for(int i = 0; i < student.length; i++)
      {
        if(student(i).equals(inCollege.student(i)))
        {
            isEqual = true;
        }
      }
    }
    if((teacher.length == inCollege.getTeacher().length) && isEqual == true)
    {
      isEqual = false;
      for(int i = 0; i < inCollege.getTeacher().length; i++ )
      {
        if(teacher(i).equals(inCollege.teacher(i)))
        { System.out.println("im in");
          isEqual = true;
        }
      }
    }
    return isEqual;
  }**
}

Student class

public class Student
{
  private String name;
  private int age;

  public Student()
  {
    name = "Samrah";
    age = 19;
  }

  public Student(String name, int age)
  {
      this.name = name;
      this.age = age;
  }
  public String getName()
  {
    return name;
  }

  public void setName(String name)
  {
    this.name = name;
  }

  public int getAge()
  {
    return age;
  }

  public void setAge(int age)
  {
    this.age = age;
  }

  public boolean equals(Object inObj)
  {
    boolean isEqual = false;
    if(inObj instanceof Student)
    {
        Student inStudent = (Student)inObj;
        if(this.name.equals(inStudent.getName()))
          if(this.age == inStudent.getAge())
              isEqual = true;


    }
    return isEqual;
  }

  public String toString()
  {
    String str;

    return str = "name: "+name+" age: "+age; 
   }

}

Teacher class

public class Teacher
{
  private String name;
  private int age;

  public Teacher()
  {
    name = "Sanjay";
    age = 45;
  }

  public Teacher(String name, int age)
  {
    this.name = name;
    this.age = age;
  }

   public void setName(String name)
  {
    this.name = name;
  }

  public String getName()
  {
    return name;
  }

  public int getAge()
  {
    return age;
  }

  public void setAge(int age)
  {
    this.age = age;
  }

  public boolean equals(Object inObj)
  {
    boolean isEqual = false;
    if(inObj instanceof Teacher)
    {
       Teacher inTeacher = (Teacher)inObj;
        if(this.name.equals(inTeacher.getName()))
          if(this.age == inTeacher.getAge())
              isEqual = true;


    }
    return isEqual;
  }

  public String toString()
  {
    String str;

    return str = "name: "+name+" age: "+age; 
   }
}

random – Sampling of two whole lists of given sizes of a distribution that have equal sums

(This question arose from the discussions in this publication.)

Context and code sample:

I'm trying to figure out if there is a way to generate two $ to $ Y $ b, $ compound $ n_a $ Y $ n_b $ integers that are sampled from a given discrete distribution dist, so that the sums of the two lists are equal (that is, Total@a == Total@b)

For the sake of discussion, the distribution can be customized, such as:

distcustom = {0.17525, 0.329672, 0.2882, 0.14761, 0.04771, 0.0101, 0.001362,
0.0001141, 0.0000001}

which can be a histogram of the integers, here 1 has a probability 0.17525, 2 has a probability 0.329672 etc.

Or a more common one, such as a Poisson distribution:

dist = Table(N@PDF(PoissonDistribution(3), i), {i, 9})

{0.149361, 0.224042, 0.224042, 0.168031, 0.100819, 0.0504094,
0.021604, 0.00810151, 0.0027005}

Sampling integers of a given distribution:

To sample lists of the desired number of integers from said disks without imposing the sum condition, in other words, creating sequences of integers from a distribution, we can do:

Let's say we want a list of 10 elements:

For an integrated distribution like PoissonDistribution we can use:

sequence = {};
sequence = RandomVariate(PoissonDistribution(3), 10)

from a custom distribution entry / histogram like distcustom we can use:

repeat(m_, n_Integer?Positive) := Sequence @@ ConstantArray(m, n)
sequence = {};
(*we generate a long list of integers sampled from distcustom, then later we randomsample from it*)
For(i = 1, i <= Length(distcustom), i++,
  tmpval = IntegerPart(Round(10000*distcustom((i))));
  If(tmpval == 0, tmpval = 1);
  sequence = Join(sequence, {repeat(i, tmpval)});
  );

I can think of two approaches:

  • Generating the a Y b list separately: we could, p. generate a long list of integers sampledls sampled according to distThis could be, for example, a list of one million integers for greater accuracy. Then to create say a, we keep trying to extract n_a item sublists of sampledls and similarly for the list b, until we find two sublists that satisfy Total@a == Total@b.

  • Partition a larger list into smaller lists of a Y b: We generate a list of $ n_a + n_b $ sampled integers of dist, let's denote by ab, then we tried several partitions of ab in two lists of a Y b having $ n_a $ Y $ n_b $ elements respectively, until we find a partition that satisfies Total@a == Total@b.

Intuitively, the second seems to be a more efficient approach (as we sample once the dist, the calculation is reduced to the creation of partitions / pairs of given sizes).

  1. Do any of these approaches seem solid? Would a similar approach to the second one be the most efficient to opt for?

  2. Is there a simpler way to solve this problem by better exploiting the integrated functionalities of Mathematica? To repeat the problem again:

Generating two lists $ to $ Y $ b, $ dice compound $ n_a $ Y $ n_b $
integers that are sampled from a given discrete distribution dist,
such that the sums of the two lists are equal (i.e. Total@a ==Total@b)

Make the input language equal to the keyboard layout

I have two language entries and two corresponding keyboard layouts.

The language with which I can change Alt+Shift, in win 7. The design with which I can change Ctrl+Shift

For some reason (randomly in my view), Windows sometimes puts all this in, mixing the input of the first language with the second keyboard layout …

As a consequence, the accent becomes crazy, as pi ~~ creamor protect & # 39; e instead of piñata or protected

Can I attach the first design with the first language?

If not. Can I display the current design on the taskbar with two letters (EN), as the language is displayed?