Conditions that imply closure under intersection of Context-Free languages

Context Free languages are not closed under intersection.

Suppose $ L_1, L_2 \in CF \setminus REG$ ($ L_1,L_2$ are context fere but not regular)

Are there well-known theorems (and/or whole papers/research topics) that try to shape the sufficient/necessary conditions for $ L_1,L_2$ to make $ L_1 \cap L_2$ context free?

how to get initial conditions for iterative Runge kutta method

So as part of my class, I have this as an assignment question

Based on the Runge Kutta method, solve

$ $ \dot x = μx − y + xy^2$ $ $ $ \dot y = x + μy + y^3$ $

with μ = −1.0, −0.5, −0.2, 0.0, 0.1, 0.5, 1.0 and your initial conditions (choose several). Draw your solutions in (x,y) domain with several paths from the above initial conditions.

So far I have only come across questions based on iterative numerical methods that have initial conditions but this one does not. My question is how do I get several initial conditions?

How to get all records in if conditions using laravel

I have two request parameters in array:

       { "users": [1,2,3], "groups": [1,2]       } 

I want to get records of users against id 1,2,4 and groups against id 1,2 i can fetch records of users but i am unable to fetch records of groups.

Here is my code:

                       public function isGroupUser(Request $  request) {     $  usersDetail = $  request->input('users', []);     $  groupsDetails = $  request->input('groups', []);      if($  usersDetail)     {         $  users = DB::table('users')             ->join('user_basic_info','users.id','=','user_basic_info.user_id')             ->select('users.id','user_basic_info.first_name')             ->whereIn('users.id',$  usersDetail)->get();         $  resultArray = ['users' => $  users];          return \Illuminate\Support\Facades\Response::json($  resultArray, 200);     }      elseif ($  groupsDetails)     {         $  groups = DB::table('group')             ->select('group.id','group.name')             ->whereIn('group.id',$  groupsDetails)->get();         $  resultArray = ['groups' => $  groups];          return \Illuminate\Support\Facades\Response::json($  resultArray, 200);     }    } 

I can get the records of users but not getting groups where i am wrong? your help will be highly appreciated!

Currently my json response:

               { "users": [     {         "id": 1,         "first_name": "Admin"     },     {         "id": 2,         "first_name": "Admin"     },     {         "id": 3,         "first_name": "Admin"     } ]    } 

But not getting the groups. Your help needs here.

Magento 2 how to check serialized conditions in frontend?

I have created an admin form which contains name and catalog price rule conditions. I have saved these values in a custom table. The conditions are saved as serialized. Now I want to check these conditions against each product in catalog product list page, product page, widgets etc. If the condition satisfied then need to display the name in each product.

How can I do this. Please help me.

Magento 2 Can’t get the sales rules conditions in my ui form submit

I have a UI form which contains 2 fields one is ‘name’ and the other is the ‘conditions’. I have tried the below code to display the conditions section and it is working fine. But I did not get the selected conditions in my save controller on form submit. I got the name and form key fields.

Here is my form

     <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">     <argument name="data" xsi:type="array">         <item name="js_config" xsi:type="array">             <item name="provider" xsi:type="string">example_form.example_form_data_source</item>             <item name="deps" xsi:type="string">example_form.example_form_data_source</item>         </item>         <item name="label" xsi:type="string" translate="true">Label Information</item>         <item name="config" xsi:type="array">             <item name="dataScope" xsi:type="string">data</item>             <item name="namespace" xsi:type="string">example_form</item>         </item>         <item name="template" xsi:type="string">templates/form/collapsible</item>         <item name="buttons" xsi:type="array">             <item name="save" xsi:type="string">Vendor\Example\Block\Adminhtml\Productlabel\Edit\Button\Save</item>             <item name="back" xsi:type="string">Vendor\Example\Block\Adminhtml\Productlabel\Edit\Button\Back</item>                 </item>     </argument>     <dataSource name="example_form_data_source">         <argument name="dataProvider" xsi:type="configurableObject">             <argument name="class" xsi:type="string">Vendor\Example\Model\ResourceModel\Productlabel\DataProvider</argument>             <argument name="name" xsi:type="string">example_form_data_source</argument>             <argument name="primaryFieldName" xsi:type="string">label_id</argument>             <argument name="requestFieldName" xsi:type="string">id</argument>             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="submit_url" xsi:type="url" path="example/example/save"/>                 </item>             </argument>         </argument>         <argument name="data" xsi:type="array">             <item name="js_config" xsi:type="array">                 <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>             </item>         </argument>     </dataSource>     <fieldset name="example_details">         <argument name="data" xsi:type="array">             <item name="config" xsi:type="array">                 <item name="collapsible" xsi:type="boolean">false</item>                 <item name="label" xsi:type="string" translate="true">Basic Details</item>                 <item name="openOnShow" xsi:type="boolean">true</item>             </item>         </argument>                <field name="name">             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="dataType" xsi:type="string">text</item>                     <item name="label" xsi:type="string" translate="true">Name</item>                     <item name="formElement" xsi:type="string">input</item>                     <item name="source" xsi:type="string">name</item>                     <item name="dataScope" xsi:type="string">name</item>                 </item>             </argument>         </field>             </fieldset>     <fieldset name="conditions_serialized">         <argument name="data" xsi:type="array">             <item name="config" xsi:type="array">                 <item name="label" xsi:type="string" translate="true">Conditions</item>                 <item name="collapsible" xsi:type="boolean">true</item>             </item>         </argument>         <container name="conditions_serialized_container" >             <argument name="data" xsi:type="array">                 <item name="config" xsi:type="array">                     <item name="sortOrder" xsi:type="number">10</item>                 </item>             </argument>             <htmlContent name="html_content">                 <argument name="block" xsi:type="object">Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Conditions</argument>             </htmlContent>         </container>     </fieldset> </form> 

Output: https://prnt.sc/nop86z Controller Function

public function execute() {         $  resultRedirect = $  this->resultRedirectFactory->create();         $  data = $  this->getRequest()->getPostValue();          echo '<pre>';print_r($  data);exit; } 

Output:https://prnt.sc/nop7oe

I am using magento 2.3 version. Please help me to resolve this

Explanation of the conditions under which the graph of a function f is symmetric relatively to a central point (a,b).

I’m reading a precalculus book telling me that if :

  • f is a function

  • (a,b) is a point

  • t and 2a-t belong to the domain of f

then the grapf of f ( or, more precisely, the curve representing f) is symmetric relatively to the point (a,b) iff

                2b-f(2a-b) =  f(t).  

How to justify this formula? Which intuitive/graphical explanation could be given?

optimality conditions for matrix

I’m struggeling with the follwoing exercise:

min $ \frac{1}{2} ||Ax-b||_2^2$ and $ A \in \mathbb{R}^{m\times n}, b \in \mathbb{R}^m$

i) Let $ m \geq n$ and $ rank(A) = n$ . Find the necessary optimality conditions first order of the optimation problem. Is it also a sufficient conditions? Calculate also an explicit representation of the optimation problem solution.

ii) Let $ m < n$ now. Calculate an explicit representation of all optimation problem solutions and for the solution with the smallest norm.

To be honest I’ve got no idea about this as we just started with optimation theories.

Do the prone or restrained conditions grant other creatures advantage on special melee attacks like grapples?

The description of the prone condition says:

  • A prone creature’s only movement option is to crawl, unless it stands up and thereby ends the condition.
  • The creature has disadvantage on attack rolls.
  • An attack roll against the creature has advantage if the attacker is within 5 feet of the creature. Otherwise, the attack roll has disadvantage.

The description of the restrained condition says:

  • A restrained creature’s speed becomes 0, and it can’t benefit from any bonus to its speed.
  • Attack rolls against the creature have advantage, and the creature’s attack rolls have disadvantage.
  • The creature has disadvantage on Dexterity saving throws.

A grapple is described as a replacement for an Attack action:

When you want to grab a creature or wrestle with it, you can use the Attack action to make a special melee attack, a grapple. If you’re able to make multiple attacks with the Attack action, this attack replaces one of them.

…but it doesn’t say a grapple is an “attack roll”.

Should we be interpreting attack rolls and Attack actions as separate things? Does that effectively mean that grapples (and other special melee attacks) get no advantage when trying to attack restrained or prone opponents?

How does Gaseous Form interact with the grappled and restrained conditions?

Among other things, the Gaseous Form spell allows a creature to

pass through small holes, narrow openings, and even mere cracks

The spell does not explicitly make the creature immune to the grappled or restrained conditions, so presumably despite being gaseous, the creature can still be grappled or restrained. However, it seems that the ability to pass through small cracks unimpeded would enable a gaseous creature to escape from any non-airtight mundane restraint in a manner similar to Freedom of Momvement, since the spaces between a person’s fingers and the rings of a pair of manacles would both seem to fit the above definition of what the creature is able to pass through.

So, can a creature affected by Gaseous Form be grappled or restrained? If so, can it escape from a non-magical, non-airtight grapple or restraint using its ability to pass through small spaces?

conditions for asymptotic comparison to hold

I have the following simple dynamical system: \begin{align} x_1′ &= a – f(x_2)x_1\ x_2′ &= bx_1 – cx_2, \end{align} where all parameters and initial conditions are positive. $ f(x_2)$ is a positive and increasing function with respect to $ x_2$ . Suppose I want to study the asymptotic behavior of this system and decide to do the following.

First, I note that the more $ x_1$ I have, the more higher the production rate for $ x_2$ will be. Secondly, I note that the larger $ x_2$ , the higher $ f(x_2)$ would be. Thus I choose to replace $ f(x_2)$ by a function $ g(x_1)$ such that:

  1. $ g(x_1) > 0$ and $ \frac{dg}{x_1} > 0$ .

  2. $ g(x_1)$ gives the same fixed points for $ x_1$ (perhaps through something like a quasi-steady-state-approximation for $ x_2$ ).

Together, I obtain: \begin{equation} x_1′ = a – g(x_1)x_1. \end{equation}

Due to the construction, the asymptotic behavior of $ x_1$ in this equation should be the same as that of $ x_1$ in the original equation. I tried this out with $ f$ and $ g$ being simple hill equation and it works.

This is just a toy example. My question is: for higher dimension and more complicated functional responses, if I only care about asymptotic behavior, when can something similar can be carried out? I would appreciate any references on this topic.