## linear algebra – how can I better model this problem?

I’m struggling with this problem where there’re families of features and each VC chooses one feature in every family (shown in the tables). enter image description here enter image description here

And the constraint is that we need 1000 VC in total. I’m trying to find how many VCs I need based on the ratio (scale) of the features. (By ratio I meant that every feature in a family adds up to 10, which means 100%). I first found how many features I need according to the info given, i.e. enter image description here

Then, I tried to solve this by finding the minimal deviation of all VCs that have the same features and that particular feature i.e. f_ij=x_a+x_b+…-F_ij
enter image description here

I get a solution after running my program in python. But I don’t know if it’s the best solution since python only gives the solution that it finds first. I don’t know if there’re better ways to do this without listing out all the solutions.

Another problem that I’m facing right now is that there’s a ratio for the VCs as well. Like based on historical data, some VCs are more popular than others. So we want to optimize the scale of the VCs at the same time. I thought of putting weights into my functions but that would change the functions as a whole. The other way I thought of doing this is to repeat what I did before with the features. So far, I can’t find any other ways to solve the problem. Can anyone please help me with these 2 problems or give me some insights? Thank you so much in advance!!!

## samsung – My model is G9xxxN, and if I download G9xxxf Stock rom , what would happen? BTW my phone is s10

If I download a different model stock ROM in my phone, what will happen? My model is G9xxxN, and if I download G9xxxf, what would happen?
BTW my phone is s10
I have g973n but I didn’t have any carrier thing before I bricked my phone and install this stock rom now it has carrier apps and also I cant even use my sim

## reference request – On the Hochschild cohomology of the minimal model of an \$A_infty\$ algebra

Suppose $$(A, (mu_k))$$ is a (curved) $$A_infty$$ algebra, and let $$(tilde A, (tildemu_k))$$ be its minimal model. Now, we have two Hochschild cohomology rings $$HH^*(A)$$ and $$HH^*(tilde A)$$. (It may be also related to $$HH^*(A,tilde A)$$ or $$HH^*(tilde A,A)$$ for the diagonal $$A_infty$$ bimodules.)

Question: Are there any natural relations between $$HH^*(A)$$ and $$HH^*(tilde A)$$ ? For instance, does there exist a ring homomorphism between them? Any reference would be greatly appreciated.

## gpu – Can I fit a 12GB tensorflow model in the mac air m1 chip with 16GB Unified RAM

I’ve read that the M1 chip uses a ‘unified memory’ architecture, where both the CPU and the GPU share RAM.

Is this equivalent to the VRAM on a traditional NVIDIA GPU?

E.g. If I have a 12GB tensorflow model, can I load this model into the 16GB RAM space on my M1 Chip?

## calculus and analysis – Fitting data to a model

I am using the following code with the following data (which I called fn):

data (fn) here: https://pastebin.com/WwANBjNx

fn = {datneg30, datneg10, dat5, dat25, dat40, dat45, dat50, dat55,
dat60, dat65, dat70, dat75, dat80, dat85, dat87, dat90, dat92};
Ta = {-30, -10, 5, 25, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 87, 90,
92};

Tre = 75 + 273.2;
unagednematic = 0.35;

avnem(t_, T_, h22_, k2ref_, C1_, C2_, n2_) :=
(h22 - unagednematic) (1 -
Exp(-( k2ref Exp(
C1 (T + 273.2 - Tre)/2.3/Abs((C2 + T + 273.2 - Tre))) t^
n2)))(*Nematic*);

datLC2 = Flatten(
Table({fn((i))((j, 1)), Ta((i)), fn((i))((j, 3))}, {i, 13, 15}, {j,
1, Length(fn((i)))}),
1);(*Creates a list of {ta,Ta,LC} from Ta=80C to Ta=87C*)

nlmLC2 = NonlinearModelFit(
datLC2, {avnem(t, T, h22, k2ref, C1, C2, n2), 0 < h22 < 1.3,
0.1 < k2ref < 10, 0 < C1 < C2, 80 > C2 > 0,
0.6 < n2 < 1}, {{k2ref, 0.28}, {h22, 1.38}, {C1, 17}, {C2,
40}, {n2, 0.75}}, {t, T});

nlmLC2("RSquared")
nlmLC2("BestFitParameters")

fpLC2b = Table(
nlmLC2(t, Ta((i))), {i, 5,
15});(*Reemplace the fitting of nlmLC2 using Ta=40 to Ta=87. Get
the equation as a function of t only. The 2 at the beginning is the
index.*)

Show(LogLinearPlot({fpLC2b}, {t, 0.001, 10000},
PlotStyle -> {Directive(Purple), Directive(Darker(Yellow)),
Directive(Orange)}),
ListLogLinearPlot(Table(fn((i))((All, {1, 5})), {i, 5, 15}),
PlotMarkers -> {Automatic, 13}, AspectRatio -> 1 ,
PlotLegends ->
Placed({40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 87}, {0.14,
0.66})), Frame -> True, PlotRange -> {All, {0, 1.4}},
Axes -> False, AspectRatio -> 1, FrameStyle -> Directive(Black, 13),
FrameLabel -> {Style("!(*SubscriptBox((t), (a))) / s", 16),
Style("(CapitalDelta)H Liquid crystal
(!(*SuperscriptBox((Jg), (-1))))", 16)})

How can I fit the data to the model of the code (e.g, h22 - unagednematic) (1 - Exp(-( k2ref Exp( C1 (T + 273.2 - Tre)/2.3/Abs((C2 + T + 273.2 - Tre))) t^n2))))?

I am getting a very bad fitting as the figure show and I know the model should be able to describe the data:

## Sdlc – Waterfall Model

The earliest SDLC version follows each measure always, never starting another one until the last one finishes. The drawback is that an issue with a few of those steps can postpone the entire procedure.

## simulation – How to implement a rule-based decision maker for an agent-based model?

I have a hard time understanding how to combine a rule-based decision making approach for an agent in an agent-based model I try to develop.

The interface of the agent is a very simple one.

public interface IAgent
{
public string ID { get; }

public Action Percept(IPercept percept);
}

For the sake of the example, let’s assume that the agents represent Vehicles which traverse roads inside a large warehouse, in order to load and unload their cargo. Their route (sequence of roads, from the start point until the agent’s destination) is assigned by another agent, the Supervisor. The goal of a vehicle agent is to traverse its assigned route, unload the cargo, load a new one, receive another assigned route by the Supervisor and repeat the process.

The vehicles must also be aware of potential collisions, for example at intersection points, and give priority based on some rules (for example, the one carrying the heaviest cargo has priority).

As far as I can understand, this is the internal structure of the agents I want to build:

So the Vehicle Agent can be something like:

public class Vehicle : IAgent
{
public VehicleStateUpdater { get; set; }

public RuleSet RuleSet { get; set; }

public VehicleState State { get; set; }

public Action Percept(IPercept percept)
{
Rule validRule = RuleSet.Match(VehicleState);
Action nextAction = validRule.GetAction();
return nextAction;
}
}

For the Vehicle agent’s internal state I was considering something like:

public class VehicleState
{
public Route Route { get; set; }

public Cargo Cargo { get; set; }

public Location CurrentLocation { get; set; }
}

For this example, 3 rules must be implemented for the Vehicle Agent.

1. If another vehicle is near the agent (e.g. less than 50 meters), then the one with the heaviest cargo has priority, and the other agents must hold their position.
2. When an agent reaches their destination, they unload the cargo, load a new one and wait for the Supervisor to assign a new route.
3. At any given moment, the Supervisor, for whatever reason, might send a command, which the recipient vehicle must obey (Hold Position or Continue).

The VehicleStateUpdater must take into consideration the current state of the agent, the type of received percept and change the state accordingly. So, in order for the state to reflect that e.g. a command was received by the Supervisor, one can modify it as follows:

public class VehicleState
{
public Route Route { get; set; }

public Cargo Cargo { get; set; }

public Location CurrentLocation { get; set; }

public RadioCommand ActiveCommand { get; set; }
}

Where RadioCommand can be an enumeration with values None, Hold, Continue.

But now I must also register in the agent’s state if another vehicle is approaching. So I must add another property to the VehicleState.

public class VehicleState
{
public Route Route { get; set; }

public Cargo Cargo { get; set; }

public Location CurrentLocation { get; set; }

public RadioCommand ActiveCommand { get; set; }

public bool IsAnotherVehicleApproaching { get; set; }

public Location ApproachingVehicleLocation { get; set; }
}

This is where I have a huge trouble understanding how to proceed and I get a feeling that I do not really follow the correct approach. First, I am not sure how to make the VehicleState class more modular and extensible. Second, I am not sure how to implement the rule-based part that defines the decision making process. Should I create mutually exclusive rules (which means every possible state must correspond to no more than one rule)? Is there a design approach that will allow me to add additional rules without having to go back-and-forth the VehicleState class and add/modify properties in order to make sure that every possible type of Percept can be handled by the agent’s internal state?

I have seen the examples demonstrated in the Artificial Intelligence: A Modern Approach coursebook and other sources but the available examples are too simple for me to “grasp” the concept in question when a more complex model must be designed.

An example of a rule I tried to incorporate:

public class HoldPositionCommandRule : IAgentRule<VehicleState>
{
public int Priority { get; } = 0;

public bool ConcludesTurn { get; } = false;

public void Fire(IAgent agent, VehicleState state, IActionScheduler actionScheduler)
{
state.Navigator.IsMoving = false;
//Use action scheduler to schedule subsequent actions...
}

public bool IsValid(VehicleState state)
{
return isValid;
}
}

A sample of the agent decision maker that I also tried to implement.

public void Execute(IAgentMessage message,
IActionScheduler actionScheduler)
{
_agentStateUpdater.Update(_state, message);
Option<IAgentRule<TState>> validRule = _ruleMatcher.Match(_state);
validRule.MatchSome(rule => rule.Fire(this, _state, actionScheduler));
}

I would be grateful if someone can point me in the right direction concerning the implementation of the rule-based part.

I am writing in C# but as far as I can tell it is not really relevant to the broader issue I am trying to solve.

## security – What is threat model for Bitcoin?

Bitcoin is secure when 51% of the miners are honest.
We also need every node to have at least one honest peer to avoid eclipse attacks.

Are these the only assumptions based on which Bitcoin is secure? Is there a complete list of assumptions and a formal analysis of the threat model somewhere?

## What type of database is best for a music library management model?

I am building an application for a client-server library management system where the server performs any library management functions such as adding a new album to the library, and the client is just an interface to the backend library.

I am trying to determine what type of database is best for my use case of modeling a music library. Initially, I was leaning towards a SQL database, such as postgresql, since my data has clearly defined relationships (tracks to albums, artists, etc.), but I am not sure how to best handle the design requirement of modeling custom or arbitrary data for tracks. For example, some people like to store a ‘mood’ for each of their tracks, optional plugins may store a specific identifier such as ‘musicbrainz_id’. It’s impossible to know ahead of time the full list of possible fields.

I’ve considered the options of custom fields in a SQL database, such as an EAV model, or using json, but if there are a lot of these types of custom/plugin-added fields, I wonder if using a document-oriented NoSQL database, such as MongoDB, is better suited.

The load on the server is most likely going to be read/query heavy, so I’d like my database to be optimal for such operations. I am not expecting a lot of concurrent requests on a single music library, but I think the possibility of concurrency rules out a database like sqlite.

Edit: If you downvote, please comment what I could do to improve my post, or if there is somewhere else my question would be better suited for.

## magento2 – Magento 2 override resource model collection not working

I want to override Magento Reports module and it’s not working. here’s my code :

di.xml

<preference for="MagentoReportsModelResourceModelReportCollection" type="SZKShamsiModelResourceModelReportCollection" />

SZKShamsiModelResourceModelReportCollection

namespace SZKShamsiModelResourceModelReport;

use MagentoReportsModelResourceModelReportCollection as OrgCollection;
use MorilogJalalijDate;

class Collection extends OrgCollection
{

/**
* @param MagentoFrameworkDataCollectionEntityFactory \$entityFactory
* @param MagentoFrameworkStdlibDateTimeTimezoneInterface \$localeDate
* @param MagentoReportsModelResourceModelReportCollectionFactory \$collectionFactory
*/
public function __construct(
MagentoFrameworkDataCollectionEntityFactory \$entityFactory,
MagentoFrameworkStdlibDateTimeTimezoneInterface \$localeDate,
MagentoReportsModelResourceModelReportCollectionFactory \$collectionFactory
)
{
parent::__construct(\$entityFactory, \$localeDate, \$collectionFactory);
}

/**
* @param DateTime \$dateStart
* @return array
* @throws MagentoFrameworkExceptionLocalizedException
*/
protected function _getDayInterval(DateTime \$dateStart)
{
\$interval = (
'period' => jDate::forge(\$dateStart)->format('Y-m-d'),
'start' => \$this->_localeDate->convertConfigTimeToUtc(\$dateStart->format('Y-m-d 00:00:00')),
'end' => \$this->_localeDate->convertConfigTimeToUtc(\$dateStart->format('Y-m-d 23:59:59')),
);
return \$interval;
}
}

everything seems ok but it’s not working.